At the moment I am working on a vehicle counting & classification project. For a specific part in the project I need to get back only the completely visible vehicles from my input data (images). I am wondering if this could be done (more) automatically in the following way:

  1. zoom in such that only approximately one van would be visible
  2. divide the vehicles into two categories: truncated and non-truncated
  3. train on these two classes
  4. After training and testing, use the model to find the completely visible vehicles.

So the main question is, is it possible that this would give sufficient results or should I try to find another solution?


It could work. I think itll be hard to find labelled bounding box data describing full/truncated cars so this is a good idea for self labelling.

Theres probably also some other ways for you to get labelled data without the crowd sourcing or self labelling. Take a large labelled car dataset with bounding boxes (COCO has some, and if your good with aerial imagery theres alot more out there), and just enforce that any car bounding boxes that are touching the boundary are truncated, while ones fully encompassed in the imaged are not, since with high probability that will be the case.

Good luck!

  • $\begingroup$ Thank you for you response, good to hear that it might be possible. Do you think it will have a negative impact if I label mixed vehicles as truncated of non-truncated? (So not only cars, but also vans for example) $\endgroup$ – JCRogier May 16 at 14:25
  • $\begingroup$ @JCRogier assuming your model can handle it, and theres enough training data, definitely! btw there exist open source pkgs with retinanet, yolo, faster rcnn, etc to save you some time! $\endgroup$ – mshlis May 16 at 15:15

Your approach should work well, you just have to test different neural networks architectures to see the most accurate one. I suggest you focus on CNNs architectures and you'll be good to go.

If you don't want to spend much time labelling your data you can only label non-truncated vehicles. Everything else is not a "non-truncated vehicle". This is even better because some images may contain persons, roads, animals... and your model will get confused if he's only trained to know truncated vehicles and non truncated vehicles. The other model will instead know how non-truncated vehicles look like and consider everything else as "not a non-truncated vehicle". And this is exactly what you need in your use-case.

  • $\begingroup$ Ah great, thank you! I was afraid that CNNs would automatically still recognize the objects if it was only partly visible, good to know that that is not necessarily the case and that I do not need to label both classes. $\endgroup$ – JCRogier May 17 at 7:45
  • $\begingroup$ When some parts of the object are recognized this will activate some neurons but not all of them, and the overall activation will not be strong enough to classify the object as "non-truncated". This is of course after your model is trained. $\endgroup$ – HLeb May 17 at 8:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.