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

Cannot train raw images with labels #8

Open
b4nn3d opened this issue Nov 13, 2020 · 5 comments
Open

Cannot train raw images with labels #8

b4nn3d opened this issue Nov 13, 2020 · 5 comments

Comments

@b4nn3d
Copy link

b4nn3d commented Nov 13, 2020

On colab, it stay forever saying this:

Exporting sample images...

Only raw images (without labels) are training fine, non raw images with labels are training fine too.
I've tried only with a 512*512 resolution.

@rainbirddigital
Copy link

I have the same problem on paperspace. If I create any labelled datasets they won't train passed "Exporting sample images" The train from no pkl file also creates an error if resume=None is used, the help describes resume=noresume which works up to the above problem.

@dvschultz
Copy link
Owner

for now I recommend using the non-raw formatting until i can figure out whats going on there. you generally cannot use transfer learning with labels unless your label count matches exactly. you can just remove the --resume argument from the training command

@RadouaneK
Copy link

@dvschultz Hi,
any solution to this problem?

@seocwen
Copy link

seocwen commented Feb 7, 2021

I'm experiencing the same problem. I didn't create my TF records from the raws, either - they're at 1024x1024 fyi. Any advice for another workaround? Does anyone have an existing pickle with a decent number of labels I can resume from?

@Guthman
Copy link

Guthman commented May 17, 2021

I'm not sure how to correctly solve the problem, but the cause is in the setup_snapshot_image_grid() function in training_loop.py. More precisely, the condition all_len(block) >= cw * ch for block in blocks) never evaluates to True, so the code keeps looping for one million times. In my case len(blocks)' is 8 and cw * ch` is 15, and stays that way.

I think what the code is doing is testing whether a full row of images is generated for each class? And I'm not sure if this has anything to do with it, but when getting minibatches the examples with label == 1 are returned until there are no more examples from that class. So I don't think more than one row is ever filled. Maybe there is something wrong with the shuffle implementation in create_from_image_folders() and create_from_image_folders_raw() which causes the minibatch to always return examples from the first class?

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

6 participants