loading
 
Training object background
Marcin from Poland  [6 posts]
12 year
Hello
I found this sentence in documentation: "Note, it is always best just to include the object to be identified without any background parts of the image."
When the object is rectangular then there is no problem - I simply crop image to contain only the desirable object. But what if object is for example circular? I can remove background texture from training image but with what color should I replace it with? I've tried to fill image background with black and transparent but none of them seems to work (object is not recognized).
Anonymous 12 year
Marcin,

A black background should do it. Most likely the technique you are using does not like what the remaining foreground is. Have you tried all different methods to see what works best? (feature, shape, harr, etc).

If not, can you post your image here for us to take a look?

STeven.
Marcin from Poland  [6 posts] 12 year
Thank you for answering.
I attach the whole scene and two training images: one with original background and one with background replaced with black. All four object recognition methods find the proper match with similar confidence: close to 100% for original background (no surprise) and about 70% for black background. So I suppose that all methods take into account also black part of the training image. It would be nice if there was a way to exclude a part of training image from confidence calculation so non-rectangular objects could be found with better confidence.
On the image provided, the object recognition module gives not so bad result because training images were cut from this image. But when I try to use it on live images that differ a little from original, the confidence drops even to 50-60%. When I lower the minimum confidence I am starting to get false matches.

   
Anonymous 12 year
Marcin,

The results you are experiencing are to be expected. While we could make the black mask less of an issue the fundamental assumption of the object recognition techniques fails. This assumption is that the object being recognized is planar. A bag fails that assumption since the wrapping of the bag will not be the same from one bag to the next. What you need to do is detect the bag based on features that would be the same from one to the other. You can also think about what is behind the bag and instead detect that. For example, the base the bag is on is planar and would be recognized. Thus if you see the base then that means that the bag is no longer there.

See attached image that is the difference between the two images on your other post. Once aligned the bag and man show up quite nicely.

Part of this process is about getting the right image from the right angle. If you want to check if a bag and just a bag is over the base then doing this subtraction trick with an overhead camera looking down at 90deg would probably be your best bet. Then by checking the color structure of the "thing that is not the background" you may be able to determine if it is just a bad or a person.

STeven.


 
Marcin from Poland  [6 posts] 12 year
Thank you for your suggestions. Still I think that object recognition techniques need some improvement (if it is possible). Even if object is planar but not rectangular they will calculate lower confidence because of background.
Anonymous 12 year
Marcin,

Agreed. We've added a checkbox in the OR module that when checked will do a better job matching a template that has a black mask in it (note that the mask needs to be a perfect 0 black and not just appear black). We tested and it does seem to help increase the confidence in your bag matching.

Can you download the most recent version, select the checkbox and retrain your templates?

STeven.

This forum thread has been closed due to inactivity (more than 4 months) or number of replies (more than 50 messages). Please start a New Post and enter a new forum thread with the appropriate title.

 New Post   Forum Index