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

Random scale/translate send object(s) out of bound #7

Closed
EngShaheen opened this issue Nov 8, 2016 · 11 comments
Closed

Random scale/translate send object(s) out of bound #7

EngShaheen opened this issue Nov 8, 2016 · 11 comments

Comments

@EngShaheen
Copy link

while trainig on my data
I got this error
Random scale/translate send object(s) out of bound
as shown in the image
and then it starts to test on the testing data and store the results to results/ folder

I think the model doesn't do the training phase properly
and the problem is in the shuffle function in TFnet.py file
in the try statement it has some error and goes to the except
any I deas about this error?
issue

@thtrieu
Copy link
Owner

thtrieu commented Nov 13, 2016

Dear @EngShaheen you are using an old version of this repo, please update and tell me if it works or not. If the problem is still there, please give me exact steps to reproduce the problem, including dataset & annotation you are using.

@EngShaheen
Copy link
Author

Thanks for your reply
I've just cloned a new version of this repo and tried again but I got another error
tf

I am using two classes
infected good
I think I have parsed them successfully
dataset

also, I think I have initialized weights successfully
weights

@thtrieu
Copy link
Owner

thtrieu commented Nov 13, 2016

I suspect you are using --savepb and --train options at the same time? If so, please finish training first before using --savepb (in combination with --load option). --savepb will disable every variable inside the network and turn them into constants, in order to produce a constant protobuf graph, so the net will not have any variable to be optimized (as in error statement).

Best of luck :)

@EngShaheen
Copy link
Author

That's right , I was setting the flag of --savepd to be True
now, I set it to False
but I got another error
epoch
I really appreciate your effort

@thtrieu
Copy link
Owner

thtrieu commented Nov 13, 2016

Well this time I cant really say the fault is on my side. I believe the image the program is trying to read does not exist. Try printing out imPath before doing anything in yolo/drawer.py/yolo_preprocess() and make sure that path does pointing to an image.

@EngShaheen
Copy link
Author

I printed the image path and it's correct except that the extension of the image is written in small letters .jpg, and all the extensions of the images in my dataset are in capital letters .JPG
here is a picture for the imPath
path

here is a picture for the extension of my dataset
data

is it case sensitive ? is there an easy way to change the parsing somehow, instead of doing it the hard way and renaming all my +1000 images in the dataset?

@thtrieu
Copy link
Owner

thtrieu commented Nov 13, 2016

well, I didn't know cv2 imread is case insensitive, I updated the code, please try again

@EngShaheen
Copy link
Author

thank you very much for you help
I suppose it is working now 👍
success

but you should add
import os
at the beginning of the yolo/drawer.py file

also, I suggest that you mention in the readme file that the annotation of the data should be the same format of the PASCAL data (xml file)
and there is a tool to annotate the data is called labelimg that output the same format

and also, I suggest that you make a default folder inside the repo for the innotation, training data and testing data

Have a nice day

@thtrieu
Copy link
Owner

thtrieu commented Nov 13, 2016

cool ! thanks for your suggestions, lots of work to be done :)

@thtrieu thtrieu closed this as completed Nov 13, 2016
@thtrieu
Copy link
Owner

thtrieu commented Nov 13, 2016

@EngShaheen By the way, I think I figured a better way to do it than patching the error directly inside drawer.py. To avoid future errors, you may want to save the current state of training, pull the new code and re- clean.py and train again (with option --load [number of latest checkpoint]). Good luck.

@EngShaheen
Copy link
Author

I see that the latest update will work for Pascal annotation. But unfortunately, it will not work for my annotation
because in my annotation in <filename> the extension of the file is not there
Here is a screenshot for my annotation
filename
Good Luck

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