Comments (42)
Share the Error with me and remember if edit a .csv manually it will not gonna work .. just have focus in xml_to_csv.py script and change this value = (root.find('filename').text+'.jpg',
by just add .jpg Extension you will able to convert xml file along with .jpg extension and then go for tf records
from raccoon_dataset.
i can see that your image is in .png format change the image format or change this line value = (root.find('filename').text+'.png',
from raccoon_dataset.
from raccoon_dataset.
before compiling the protobuf files do this command run SET PATH=%PATH%;%PYTHONPATH% then compile and to make sure to run this command “echo %PYTHONPATH%” it will show the to check the environment variables and make sure they are set up correctly.
Also, make sure you have run these commands from the \models\research directory:
setup.py build
setup.py install
the issue you are facing because of the PATH is not set correctly and protobuf compiling .
from raccoon_dataset.
Hey can any one help me with this error?
from raccoon_dataset.
Does /home/kartik/machine_learning/Tensorflow/dataset/images/000084.png exist?
you mustn't move your files after making the annotations.
speaking of issues, the xml files have the file path, but the scripts don't use that info, instead all the files have to be in one place, which can be avoided.
from raccoon_dataset.
from raccoon_dataset.
@kartikpaigwar ...i am facing this issue while generating tfrecord file....please help
Traceback (most recent call last):
File "F:/Object_detection/generate_tfrecord.py", line 98, in
tf.app.run()
File "C:\Users\Harjeet\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\platform\app.py", line 126, in run
_sys.exit(main(argv))
File "F:/Object_detection/generate_tfrecord.py", line 89, in main
tf_example = create_tf_example(group, path)
File "F:/Object_detection/generate_tfrecord.py", line 44, in create_tf_example
encoded_jpg = fid.read()
File "C:\Users\Harjeet\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\lib\io\file_io.py", line 120, in read
self._preread_check()
File "C:\Users\Harjeet\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\lib\io\file_io.py", line 80, in _preread_check
compat.as_bytes(self.__name), 1024 * 512, status)
File "C:\Users\Harjeet\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\framework\errors_impl.py", line 516, in exit
c_api.TF_GetCode(self.status.status))
tensorflow.python.framework.errors_impl.NotFoundError: NewRandomAccessFile failed to Create/Open: F:\Object_detection\images\pic3.jpeg : The system cannot find the file specified.
; No such file or directory
from raccoon_dataset.
You might have moved the images after annotations. All train and test images should be in one folder only. Check the path in the script.
from raccoon_dataset.
@kartikpaigwar yes the images were in separate test and train folder inside images folder, but the code was looking in images folder not inside another folder under images.
thanks for the valuable comment.....it worked for me once i understood what was wrong in my approach.
from raccoon_dataset.
@Technebby i have exactly the same in images there is test and train folder and i have the same error please tell me from where i can change the path ??
from raccoon_dataset.
@fawadhussain703 in my case, what i did was, i just copied and paste all images in test and train folder in to my image folder also along with my test & train folder like this.
and run the script. With this simple change i was able to create the tf.record file for my test and train images.
i hope this will resolve your issue.
from raccoon_dataset.
i did the exact same my command is python generate_tfrecord.py --csv_input=images\test_labels.csv --image_dir=images\test --output_path=test.record (can you tell me your command) that you used to run the script ?
from raccoon_dataset.
@Technebby and i m able to generate test.record file but it was empty and error is still standing.
from raccoon_dataset.
@fawadhussain703 follow this link it will help you get through
https://github.com/EdjeElectronics/TensorFlow-Object-Detection-API-Tutorial-Train-Multiple-Objects-Windows-10
and will clear your doubts also.
from raccoon_dataset.
this was my path
from raccoon_dataset.
i did it working fine but can you guide me how to speed up frames in real time it is laging a lot?? but detection a object fine?
from raccoon_dataset.
@fawadhussain703 i am using FRCNN model and mine is working fine. I haven't made any change in the program to increase frames speed but you can use different models for this thing. FRCNN is little slow but more accurate than SSD, which is faster but less accurate when compared with each other. You can try different models like SSD inception or mobilenet model.
rest i don't know much about how to increase frames.
from raccoon_dataset.
Hey. The error still exists even after pasting the contents of the test and train folder along with the two .csv files in the images folder. I am executing the script from the anaconda prompt.
Could you tell me all the points to be kept in my mind right from the beginning, i.e, from labelling to running the generate tf record script?
Thank You
from raccoon_dataset.
Worked like a charm. Thank You :)
@fawadhussain703
from raccoon_dataset.
Pleasure .
from raccoon_dataset.
python generate_tfrecord.py --csv_input=data/test_labels.csv --output_path=data/test.record
Traceback (most recent call last):
File "generate_tfrecord.py", line 99, in
tf.app.run()
File "/home/kartik/tensorflow/lib/python3.5/site-packages/tensorflow/python/platform/app.py", line 48, in run
_sys.exit(main(_sys.argv[:1] + flags_passthrough))
File "generate_tfrecord.py", line 90, in main
tf_example = create_tf_example(group, path)
File "generate_tfrecord.py", line 45, in create_tf_example
encoded_jpg = fid.read()
File "/home/kartik/tensorflow/lib/python3.5/site-packages/tensorflow/python/lib/io/file_io.py", line 118, in read
self._preread_check()
File "/home/kartik/tensorflow/lib/python3.5/site-packages/tensorflow/python/lib/io/file_io.py", line 78, in _preread_check
compat.as_bytes(self.__name), 1024 * 512, status)
File "/usr/lib/python3.5/contextlib.py", line 66, in exit
next(self.gen)
File "/home/kartik/tensorflow/lib/python3.5/site-packages/tensorflow/python/framework/errors_impl.py", line 466, in raise_exception_on_not_ok_status
pywrap_tensorflow.TF_GetCode(status))
tensorflow.python.framework.errors_impl.NotFoundError: /home/kartik/machine_learning/Tensorflow/dataset/images/000084.png
I'm facing the same issue can some please help me out.
from raccoon_dataset.
Share the Error with me and remember if edit a .csv manually it will not gonna work .. just have focus in xml_to_csv.py script and change this value = (root.find('filename').text+'.jpg',
by just add .jpg Extension you will able to convert xml file along with .jpg extension and then go for tf records
I have the same issue can you help me out
from raccoon_dataset.
from raccoon_dataset.
000084.png Remove this file from your database and all other images those are with .png format and then generate tf.records.
from raccoon_dataset.
@fawadhussain703
Hi I am facing below error while creating tfrecords, please advise & help:
File "D:\anaconda\lib\site-packages\absl\flags_flagvalues.py", line 473, in getattr
raise AttributeError(name)
AttributeError: output_path
Doubt: Is this code is only to convert .JPG to TFrecord or it works for .PNG format too.
from raccoon_dataset.
@fawadhussain703
Hi I am facing below error while creating tfrecords, please advise & help:File "D:\anaconda\lib\site-packages\absl\flags_flagvalues.py", line 473, in getattr
raise AttributeError(name)AttributeError: output_path
Doubt: Is this code is only to convert .JPG to TFrecord or it works for .PNG format too.
show us complete Error.
you have to make your data set in one format either png or jpg.
if you are genrating tfrecords for PNG do this (root.find('filename').text+'.png',
for JPG (root.find('filename').text+'.jpg',
from raccoon_dataset.
from raccoon_dataset.
from raccoon_dataset.
Guys I solved this problem using
python3 generate_tf_record.py --csv_input=data/train_labels.csv --output_path=train.record
python3 generate_tf_record.py --csv_input=data/test_labels.csv --output_path=test.record
all the images were in one folder i.e images and flags were as below
flags.DEFINE_string('csv_input', '','data/train_labels.csv')
flags.DEFINE_string('output_path','', 'train.record')
flags.DEFINE_string('image_dir', '', 'images')
I saved record file in main folder and later copied it to data folder
from raccoon_dataset.
from raccoon_dataset.
Any one please help me out from the error which i couldn't overcome for a week???
after using the below command
python3 generate_tfrecord.py --csv_input=data/train_labels.csv --output_path=data/train.record --image_dir=images/
I received the following error
flags = tf.app.flags
AttributeError: module 'tensorflow' has no attribute 'app'
anybody please help me out??
To overcome this error????
from raccoon_dataset.
REPLACE import tensorflow as tf WITH import tensorflow.compat.v1 as tf
from raccoon_dataset.
from raccoon_dataset.
from raccoon_dataset.
- This issue is closed
- "Can you help me?" is a really bad way to ask for help. At least when it comes to posting questions and awaiting answers.
- Read this: https://idownvotedbecau.se/nocode/
- Read this: https://idownvotedbecau.se/nodebugging/
- Read this: https://idownvotedbecau.se/noresearch/
- Read this: https://idownvotedbecau.se/imageofanexception/
- Don't ask new questions/bring up new issues in an existing issue.
from raccoon_dataset.
from raccoon_dataset.
Thanks for the answer,I have figured it out.
…
On 06-Dec-2017 1:05 AM, "FalcoGer" @.***> wrote: Does /home/kartik/machine_learning/Tensorflow/dataset/images/000084.png exist? you mustn't move your files after making the annotations. speaking of issues, the xml files have the file path, but the scripts
Thanks for the answer,I have figured it out.
…
On 06-Dec-2017 1:05 AM, "FalcoGer" @.***> wrote: Does /home/kartik/machine_learning/Tensorflow/dataset/images/000084.png exist? you mustn't move your files after making the annotations. speaking of issues, the xml files have the file path, but the scripts don't use that info, instead all the files have to be in one place, which can be avoided. — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub <#31 (comment)>, or mute the thread https://github.com/notifications/unsubscribe-auth/AS9sTeN5nKh0QcsDWdoJnOuLWpn_lCOTks5s9ZscgaJpZM4Q2Wpy .
Hey did you run the script successfully with .png format?
from raccoon_dataset.
i can see that your image is in .png format change the image format or change this line value = (root.find('filename').text+'.png',
where should i add this line??
from raccoon_dataset.
i can see that your image is in .png format change the image format or change this line value = (root.find('filename').text+'.png',
where should i add this line??
I guess in the Python script generate_tf_record.py
from raccoon_dataset.
i solved this issue by rename correctly the xml file (inside of it) and the image file. both have to be in same name otherwise you can't generate tfrecord.
from raccoon_dataset.
i solved this issue by rename correctly the xml file (inside of it) and the image file. both have to be in same name otherwise you can't generate tfrecord.
I would recommend to share some pictures with us (images, xml, the script you use) and what TF version you using?
from raccoon_dataset.
Related Issues (20)
- UNKNOWN ERROR. PLEASE HELP! HOT 1
- TFRecord load HOT 1
- How do you evaluate an image while training the model as you did in your article
- UnicodeDecodeError HOT 4
- ERROR in generate_tfrecord.py ( AttributeError: output_path ) HOT 1
- train_dir is missing while training object detection using tensorflow lite HOT 1
- python: can't open file 'generate_tfrecord.py': [Errno 2] No such file or directory HOT 1
- run 'generate_tfrecord.py' error HOT 3
- Unable to generate TFRrecord: getting error : TypeError: None has type NoneType, but expected one of: int, long
- Getting Blank record file on Tfrecod generation
- @chuasonglin I followed your revisions and keep getting this error:
- issue while generating tf.record
- in <module> flags = tf.app.flags AttributeError: module 'tensorflow' has no attribute 'app' HOT 4
- MacOS: ModuleNotFoundError: No module named 'object_detection'
- appeared xml_to_csv.py file
- xml_to_csv: format in the csv file
- generate_tfrecord.py not workingn correctlyt with png images
- Traceback (most recent call last):
- Can the new dataset (raccoon) be combined with the old dataset of the pre-trained model?
- xml_to_csv.py error index is out of range HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from raccoon_dataset.