Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detecting other objects similar to trained model #134

Open
navneet-applify opened this issue Mar 25, 2020 · 3 comments
Open

Detecting other objects similar to trained model #134

navneet-applify opened this issue Mar 25, 2020 · 3 comments

Comments

@navneet-applify
Copy link

Hello.
Thanks for this awesome lib.

I'm facing a problem that it is detecting the other objects which similar to the trained object in terms of colors.

How can i stop TensorFlow to not give a result based on some color matching thing?

Please let me know if there's anything I can do.

@Ashwin-Ramesh2607
Copy link

There is no easy fix to this, however, I can suggest some alternatives. You want your model to learn features and not just colors (maybe to some extent yes) of each object you want to detect. You can probably achieve this by augmenting your images and increasing the size of the dataset. For choosing which augmentation to apply, choose anything which might change colors of an object to a little extent but retain the overall structure and shapes of the objects you want to classify. I could think of changing brightness, saturation, contrast, hue, etc.
Although this will increase your model's learning capability, it will still give a class label from the classes you have provided. 2 possible fixes:

  1. Find a suitable threshold in the softmax probability of the last layer, something to the effect of, if no class has a confidence of greater than 50 %, then don't display any class. (Ad-Hoc approach)
  2. Create a new class in your image dataset of random things, that have a similar color to your previous objects and label the class as 'background'. This way, the model will actually learn what constitutes as background, and not one of the original class labels.

@navneet-applify
Copy link
Author

Hi Ashwin

Thanks for suggestion

I think your second point can be helpful. I will try and let you know about this.
And one more thing do I have to add landscape and verticle image of the same model?
because in some cases the failure to scan in portrait or landscape.

@Ashwin-Ramesh2607
Copy link

I think there may be some image size issues, because having both portrait and landscape may result in inconsistent image sizes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants