loading
 
Shape Match Confidence
Jeff   from United States  [9 posts]
10 year
I am using shape matching, and have an image recognized at 90.8% confidence, and 105% size, using a filter size of 101 to 130%.  However when I increase the filter size to 90-130% to recognize other images, the image is no longer recognized because the confidence drops.  It seems that the confidence level is tied to the size.  Even though the image still fits within the new size filter range, the confidence is poor.  If I tighten the filter size, then I have other images that get rejected because of size variation.  If I drop confidence, then incorrect images are recognized.  Any recommendations on how to solve this dilemma?
Steven Gentner from United States  [1446 posts] 10 year
Jeff,

The confidence is not necessarily tied to the size but its possible that a less confident match is causing the more confident match to be skipped. Thus it appears that the confidence is tied to the size.

Are you able to post the template (the gold standard) and the test image? We can then better track down where the problem may be happening and ensure that worse matches do not interfere with better ones.

Its a bit strange to see this behavior in the shape matching module. We'd expect to see this in the Object Recognition module as the shape matching module typically only tests each shape once without any overlap ... but perhaps there is something in the images you are using which is causing the module to get a little confused. See the images in use will help explain this.

Thanks!
STeven.
Jeff   from United States  [9 posts] 10 year
STeven, I have attached the template and the test image.

Thanks,
Jeff

  
Steven Gentner from United States  [1446 posts] 10 year
Jeff,

Thanks for the images. It seems that with just having the 9 as a training image I'm not seeing any of the comparison changes. So its most likely then due to conflict with other shapes that you are training. Could you zip all the templates up and post them here? We think another shape is probably causing the issue with the match.

Also, I noticed the images are of digits. We plan to release an OCR module in about a week an a half that should make some of this easier. However, it may not work as well on your hand written digits as the 9 is not complete and the 8 does not contain a very good hole definition. Still, it will be another thing to try.

Thanks,
STeven.
Jeff   from United States  [9 posts] 10 year
Thanks STeven, perhaps it is getting confused by my 6 digit.  I am using rotational invariance to allow some rotation variation, however also using filter orientation 270 degrees to 90 degrees, to distinguish between the 6 and 9 digits.  When I removed the rotation filter, it thinks my 9 is a 6 at 91.46% confidence, size at 91%.  I have attached my train library, and at one point kept adding to it when new digits were not recognized until I had over 70 images, but then realized that was degrading the confidence, so have tried to minimize the number of shapes in the trained library to what I have attached.

Thanks,
Jeff
Match Simple.zip
Jeff   from United States  [9 posts] 10 year
STeven, I was able to confirm it was skipping because of my 6 digit, which looks the same except upside down.  I removed it from the library, and now the 9 is recognized using the larger size filter.  Perhaps I need to include a VBScript to recognize 9 or 6 based on its orientation value.
As you can tell from my previous zip file, I am also having to add more 7 digits, because sometimes new ones are not recognized.  I am having this general issue, where do I keep tweeking the shape factor settings to recognize shapes, or do I keep adding variations to the shape library?  

Thanks,
Jeff
Steven Gentner from United States  [1446 posts] 10 year
Jeff,

Thanks, that explains the problem. The issue is that the 6 template actually matches better than the 9 template. As you noticed this and added in the 270 to 90 orientation check, that check was eliminating the 6 match but NOT then attempting the 9 match since that shape had already been eliminated. To remedy this, we've moved the orientation check lower down such that if shapes are eliminated by the orientation they are still matched against less confident templates. This fix seems to remedy your issue and still allow some orientation flexibility.

Please download the latest RR version and give this a try.

STeven.
Jeff   from United States  [9 posts] 10 year
Thanks STeven, the latest RR version fixed the orientation issue.

Thanks!
Jeff
Jeff   from United States  [9 posts] 10 year
STeven, any advice on the issue with the 7 shape?  It seems to be difficult to recognize compared to other shapes.  Should I keep adding more 7's to my library, or will that just confuse the confidence when trying to match?

Thanks,
Jeff
Steven Gentner from United States  [1446 posts] 10 year
Jeff,

You can always add more 7's to the database. It will not confuse the matching unless one of the 7's that you add looks simliar to a 1 which may cause some 1's to appear as 7's (its a bit tricky to get right). Nevertheless, the concern is more about slowing things down when you add more templates.

There may also be other contextual ways to resolved this. Its common that certain letters are confused with others ... like a 7 and a 1. If you know more about the context of the problem there might be an easier way to ensure correct identification, i.e. if a year is always expected (assuming this from 1978) then its possible to use that to ensure the start is 19 or 20 depending on the context of the problem. There are other cases in which if you know that 4 digits are expected that once 1 of high confidence is recognized, you can relax the threshold for the other 3 letters if you find the digits are being excluded due to low match confidence. All this requires additional information about what the project is and making reasonable assumptions about that. This is the context of a problem that humans really rely on to solve many problems.

We use some of this in the new OCR module which may work better for you ... or may work worse since the matching technique is quite different than the shape match.

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