nwojke / cosine_metric_learning

Deep Cosine Metric Learning for Person Re-identification
GNU General Public License v3.0
585 stars 201 forks source link

Multi class training question #72

Open pamparana34 opened 4 years ago

pamparana34 commented 4 years ago

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?

LeonLok commented 4 years ago

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.

sherlockchou86 commented 4 years ago

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.

dexter2406 commented 3 years ago

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...