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

Added recursive image searching to the retrainer #113

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Gum-Joe
Copy link

@Gum-Joe Gum-Joe commented Feb 15, 2019

When using the retrainer script, only the first level of directories is searched. So, given this file tree:

images
   class_1
      image.jpg
   class_2
      sub_class_3
         image2.jpg

Only image.jpg would be detected, not image2.jpg
This can be troublesome, for example, when you want an image to also fall into a more broad category, i.e category bottoms, sub-category jeans for a clothing classifier.

I've edited the functioncreate_image_lists to now recursively scan directories for photos, joining categories together with a ..
For example, given this file tree:

images
   tops
      t-shirts
         superdry
            t-shirt.jpg
   bottoms
      jeans
            jeans.jpg

t-shirt.jpg would be labelled tops.t-shirts.superdry and jeans.jpg as bottoms.jeans

This is so images which may not be in the direct sub dirs of a selected dir can be used.
@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here (e.g. I signed it!) and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

Googlers can find more info about SignCLA and this PR by following this link.

@Gum-Joe
Copy link
Author

Gum-Joe commented Feb 15, 2019

CLA has been signed.

@googlebot
Copy link

CLAs look good, thanks!

Googlers can find more info about SignCLA and this PR by following this link.

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

Successfully merging this pull request may close these issues.

2 participants