cosine_metric_learning icon indicating copy to clipboard operation
cosine_metric_learning copied to clipboard

Multi class training question

Open pamparana34 opened this issue 5 years ago • 3 comments

I have a question regarding training this object for multiple object classes.

Say I want to track pedestrians and cars. Would one need to train two models i.e. one for pedestrians and one for cars? Or is it somehow possible to train one model for multiple classes?

I think one can do it with one model but might require a lot of data samples where the embedding will split the space ideally into the two categories and have the discrimination within the categories in these partitioned spaces but I am not 100% sure.

Does anyone have an idea on this?

pamparana34 avatar May 02 '20 17:05 pamparana34

I also want to track pedestrians and cars and I'm not sure how to go about this too.

I'm currently training a vehicle tracking model with cropped images of size (100, 100). If I have a pedestrian model trained on cropped pedestrian images of say size (128, 64), can I train the vehicle tracking model on top of that? Is transfer learning possible at all?

I've been thinking of training everything together in one go, but I'm not sure this is a good idea.

LeonLok avatar Jun 04 '20 14:06 LeonLok

No practise, but I think it better to train 2 models for pedstrain and vehicles separately, because these 2 classes is unsimilar at all.

You can train only 1 model for vehicles, although it includes car, bus and truck etc, they are similar.

sherlockchou86 avatar Aug 27 '20 04:08 sherlockchou86

No practise, but I think it better to train 2 models for pedstrain and vehicles separately, because these 2 classes is unsimilar at all.

You can train only 1 model for vehicles, although it includes car, bus and truck etc, they are similar.

Good point! So when using them for inference, I just load both models(extractors) beforehand, and selectively run one according to the detection result? Sounds not so elegant but seems a intuitive way...

dexter2406 avatar Jan 21 '21 21:01 dexter2406