1
votes

I have trained TensorFlow Object Detection API on my own PascalVOC dataset with 7 classes. In each class there are from 100 to 200 images. I was using ssd_mobilenet_v1_pets.config standard configurations, except number of classes and number of steps options.

Before training I did resizing job with images so every image in my set is from 600 up to 1024px. Annotations has been done with LabelImg App.

After train job with 100k steps has been done I tried my model using code from jupyter notebook tutorial on several test images. Unfortunately results were kind of weird.

If test image contains only one object, it works fine:

enter image description here

But if there are a lot of objects on image result is being weird or not even shows up:

enter image description here

You can see it detects almost the whole image for some reasons. So what can you to reach detection of multiple objects on image like on the above one.

Will be very grateful for any help. Thanks in advance!

Here is my label map for any case:

item {
  id: 1
  name: 'chesterfield_blue'
}

item {
  id: 2
  name: 'chesterfield_red'
}

item {
  id: 3
  name: 'lucky_strike_blue'
}

item {
  id: 4
  name: 'lucky_strike_red'
}

item {
  id: 5
  name: 'marlboro_gold'
}

item {
  id: 6
  name: 'marlboro_mentol'
}

item {
  id: 7
  name: 'marlboro_red'
}
1
did you try running the algorithm on smaller parts of the enlarged image ? What algorithm is being used to detect the objects? Is it handling the image pyramid itself? - omu_negru
Thank you for responding @omu_negru, yes I have been trying the algorithm on images where there are less objects. Detector was able to find one or maximum two objects, but others were missed also. If there is a sense, I can try also to crop existing test images to see how it work on parts of enlarged images. Talking about algorithm, If you mean which checkpoints I was using for training, they were from ssd_mobilenet_v1_coco model, but if you asking how I was evaluating model after training, I simply used jupyter notebook tutorial example from their repo. Feel free to ask any additional info. - Michael

1 Answers

2
votes

Faster RCNN model and it`s configuration helped me to improve results.

Also I added a couple of images where cigarette boxes are on store stands, so conditions are quite similar to that images I`m trying to process.

Improved results (note I didn`t add all cigarette instances to the model):

enter image description here