TransWikia.com

How to choose our data set wisely?

Data Science Asked on June 14, 2021

I have a couple of questions and I was wondering if you could answer them.

I have a bunch of images of the cars (side view only). I would like to train a model with those images. My objects of interest are 3 types of trucks that have different trailers. I rarely see two target objects at once in an image (maybe $1over2$ in every 1000 images). However, I do see other types of cars that I do not want to detect.

My questions are:

Do you think I should tackle this problem as a detection task or classification task? (For example, should I consider multilabel classification or omit those pictures).

Should I also include other vehicles that I do not want to detect in my training dataset? Let’s say that I do not assign a bounding box to them, but include them in training dataset just to make the system robust. (I trained YOLO with 200 images, sometimes the trained model confused and detected the wrong object that is not in any of classes, this happens when training with 2000 images per class? This is due to a small number of dataset or it is because of not including those images with no bounding boxes)?

Thank you in advance!

2 Answers

You have got nothing to lose by framing it as a multi-label detection task. All you have to do is remove the final Softmax layer and format your ground truth as multi-hot, and you can regress multiple labels directly. Mean Squared Error and Sum of Absolute Differences are neutrally biased with respect to false positives and false negatives if the data are balanced, whereas categorical cross-entropy is biased for higher recall and lower precision and usually does not work as well once the Softmax is removed, so choose your loss function accordingly.

Definitely include more objects in your training set that you don't want to detect--this will reduce overfitting by forcing the detection template(s) to improve their specificity.

Answered by pygosceles on June 14, 2021

I would think of this as a object detection problem with three (3) classes. I would initially train the model without images that don't have any of the target classes (no bounding boxes). Rather I would include images that have at least one of the target classes (with bounding boxes) and few of the non-target objects. Eventually, I will test the model with unseen images including those images that don't have any of the target classes. If the model doesn't perform well, I would try to address the reason and retrain accordingly (most likely training again with more images per class, balanced dataset etc.).

Also, I think the model would predict the non-target objects as one of the target classes with low confidence and likewise it will predict the correct objects with higher confidence. If that's the case, I would increase the confidence threshold accordingly which will restrict the model from detecting low-confidence non-target objects.

Answered by Sanjay Saha on June 14, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP