TinEye API result field: query_match_percent
We have introduced a new parameter in the TinEye API results that will help you filter out small area matches like logos from your image search results.
The TinEye API response includes a query_match_percent
field that returns a value between 0 and 100, representing the percentage of the query image that matches the result image. Remember that this value is usually less than 100, even for visually identical images, due to how matching regions are identified and compared.
When a match result has a very low query_match_percent
value, it's safe to assume that the matching region of the query image is too small to be considered relevant for use cases where small area matches like logos are not desired. Here are some recommended thresholds to filter out these matches:
- Less than 5%: This will help you eliminate most logo matches, but you might need to use a higher threshold for query images containing large logos.
- Greater than 10%: Not recommended, as it might cause you to discard some good matches.
To implement filtering, you can follow these steps:
- Run your image searches through the TinEye API directly to get the full API response. Do not use any of our client libraries as they do not support this new field.
- Parse the response to check the
query_match_percent
value for each image match. - Filter out matches with a query_match_percent value less than 5%
- Review the remaining matches
By following these steps, you'll be able to reduce irrelevant results like logo matches from your searches.