2
$\begingroup$

I loaded a neural network model trained with Caffe by other people in OpenCV.

The model should detect the presence of a car in a single parking spot outputting the probability of it being free/occupied.

The model was trained with images all belonging to the same parking area, taken at different hours of day and with different light conditions. Images were taken by different cameras but the cameras are all of the same model (raspberry cameras).

I tried to run the model with a few images some of them taken from their dataset and other downloaded from google.

The images taken from their dataset are correctly classified while the ones taken from google are not correctly classified.

My question is: is it possible to deploy a NN model trained with images all coming from a single parking area in another parking area? Is not such a model for parking detection occupancy supposed to generalize independently from the location where training images have been taken?

If you know about an already existing trained model that works good please let me know.

$\endgroup$
  • $\begingroup$ It is unlikely anyone will know of or be willing to search for an existing model - such requests are generally off-topic in Stack Exchange. $\endgroup$ – Neil Slater Oct 25 '18 at 13:50
  • $\begingroup$ That is not my main question and I am not asking for people looking for it. I am just asking that if they know about the existance of such models please let me know. $\endgroup$ – Francesco Boi Oct 25 '18 at 13:52
1
$\begingroup$

My question is: is it possible to deploy a NN model trained with images all coming from a single parking area in another parking area? Is not such a model for parking detection occupancy supposed to generalize independently from the location where training images have been taken?

Generalisation in machine learning has limits, and for complex systems such as computer vision, it is very easy to exceed them. This is why the state-of-the-art systems use huge amounts of training data which is often augmented with automated variations, plus trained on for many days.

If you want some factor in your model to generalise well, you should:

a) Train with variations in that factor

b) Test with variations in that factor that have not already been seen in the training set

For the factor you wish to have the model generalise in, then it looks like (a) has not been done, and that you have just done (b) and found that the first attempt has failed an important test that you care about.

I suspect the trained model you have used will generalise well by time of day, type of vehicle and some other details. It does not appear to generalise to a new location because it was trained on only one location.

If you have limited training data, you may want to look at approaches to fine-tuning against more general image classifiers (such as the many ImageNet-trained classifiers, which are available to download). However, even then you should train with a few varieties of parking space, or at the very least with the spaces that you care about (if you do the latter then it probably won't generalise to other spaces, but you won't care).


It may also be worth seeing what you can do to transform the input that you are working with to have similar view over the new parking area that the training images have. Using a transform to align the outline of the new area with the old one, and possibly some colour correction could help a lot.

$\endgroup$

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.