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
Unable to generate tf records #14
Comments
Hi, its easy to fix |
@Shivakishore14 : that solution didin't work for me, unfortunately. I do have multiple classes and have used elif to describe them. When checking across different solutions available on the net, most people (including datitran) pointed out that it might be a missing class or a misspell of a class in the train csv file. Am not able to figure that out since the labelling is done using labelImg, it saves these classes as xml, the xml_to_csv.py converts this to a csv. Am not sure under what circumstance I could have had the opportunity to miss out or misspel any class incorrectly. Here's my error msg: Has anyone found a solution for this? |
@P-a-i-s Did you find the solution? I am still unable to do it. |
@JoltonDsouza Hmm.. its been a while since I've completed this project. Trying to re-collect the reason for this error in my mind. I am guessing you have multiple classes and hence are running into an error when defining the if-else loops. Is that so? If yes, and I pretty much suspect that. try the following: if row_label == 'pineapple': Most forums talk about return equal None. It should be zero. Hope this works for you. |
You just need to change the else statement so it returns 0 instead of "None".
|
Hi Admin sorry if i seem trolling old thread. Hey @P-a-i-s , @rfgm6 , your solution works!. Made me happy until i made this reply just to thank you guys. Found out the error prompt came out due to it reached EOL hence if 'None' will cause the module to output an error. But despite the error the file test.record is already in the folder. Anyway i prefer my code to run error free. |
I encountered the same issue, also i fixed the return to 0, the problem still persists |
C:\Users\admin\Desktop\object-detection>python generate_tfrecord.py This is the error i'm facing |
I also found the .record files in my directory even though I got the "TypeError: None has type NoneType, but expected one of: int, long" error, but will those .record files work despite the error? |
If we are giving 0 as return, should we add the index in labelmap.pbtxt file too?? |
Just change the label name whatever you labeling them during crop the image by labelImg tool.
Instead of 'raccon' put label name for ex:- 'car'. |
Im getting the following error while trying to generate tf records
The text was updated successfully, but these errors were encountered: