Giter Club home page Giter Club logo

Comments (42)

fawadhussain703 avatar fawadhussain703 commented on August 14, 2024 1

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.

fawadhussain703 avatar fawadhussain703 commented on August 14, 2024 1

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.

Aishwarya2203 avatar Aishwarya2203 commented on August 14, 2024 1

from raccoon_dataset.

fawadhussain703 avatar fawadhussain703 commented on August 14, 2024 1

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.

vinaykumarvedepu avatar vinaykumarvedepu commented on August 14, 2024 1

Hey can any one help me with this error?
Screenshot (40)

from raccoon_dataset.

FalcoGer avatar FalcoGer commented on August 14, 2024

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.

kartikpaigwar avatar kartikpaigwar commented on August 14, 2024

from raccoon_dataset.

Technebby avatar Technebby commented on August 14, 2024

@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.

kartikpaigwar avatar kartikpaigwar commented on August 14, 2024

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.

Technebby avatar Technebby commented on August 14, 2024

@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.

fawadhussain703 avatar fawadhussain703 commented on August 14, 2024

@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.

Technebby avatar Technebby commented on August 14, 2024

@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.
explain
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.

fawadhussain703 avatar fawadhussain703 commented on August 14, 2024

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.

fawadhussain703 avatar fawadhussain703 commented on August 14, 2024

@Technebby and i m able to generate test.record file but it was empty and error is still standing.

from raccoon_dataset.

Technebby avatar Technebby commented on August 14, 2024

@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.

Technebby avatar Technebby commented on August 14, 2024

@fawadhussain703
capture

this was my path

from raccoon_dataset.

fawadhussain703 avatar fawadhussain703 commented on August 14, 2024

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.

Technebby avatar Technebby commented on August 14, 2024

@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.

v-prgmr avatar v-prgmr commented on August 14, 2024

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.

v-prgmr avatar v-prgmr commented on August 14, 2024

Worked like a charm. Thank You :)
@fawadhussain703

from raccoon_dataset.

fawadhussain703 avatar fawadhussain703 commented on August 14, 2024

Pleasure .

from raccoon_dataset.

Aishwarya2203 avatar Aishwarya2203 commented on August 14, 2024

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.

Aishwarya2203 avatar Aishwarya2203 commented on August 14, 2024

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.

Aishwarya2203 avatar Aishwarya2203 commented on August 14, 2024

from raccoon_dataset.

fawadhussain703 avatar fawadhussain703 commented on August 14, 2024

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.

rahulramesh3321 avatar rahulramesh3321 commented on August 14, 2024

@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 avatar fawadhussain703 commented on August 14, 2024

@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.

rahulramesh3321 avatar rahulramesh3321 commented on August 14, 2024

from raccoon_dataset.

rahulramesh3321 avatar rahulramesh3321 commented on August 14, 2024

from raccoon_dataset.

BasitJaved avatar BasitJaved commented on August 14, 2024

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.

unaisshazan avatar unaisshazan commented on August 14, 2024

desk 54
how to solve this

from raccoon_dataset.

vignashrs avatar vignashrs commented on August 14, 2024

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.

macWinner avatar macWinner commented on August 14, 2024

REPLACE import tensorflow as tf WITH import tensorflow.compat.v1 as tf

from raccoon_dataset.

unaisshazan avatar unaisshazan commented on August 14, 2024

from raccoon_dataset.

unaisshazan avatar unaisshazan commented on August 14, 2024

from raccoon_dataset.

FalcoGer avatar FalcoGer commented on August 14, 2024

@vinaykumarvedepu

  1. This issue is closed
  2. "Can you help me?" is a really bad way to ask for help. At least when it comes to posting questions and awaiting answers.
  3. Read this: https://idownvotedbecau.se/nocode/
  4. Read this: https://idownvotedbecau.se/nodebugging/
  5. Read this: https://idownvotedbecau.se/noresearch/
  6. Read this: https://idownvotedbecau.se/imageofanexception/
  7. Don't ask new questions/bring up new issues in an existing issue.

from raccoon_dataset.

unaisshazan avatar unaisshazan commented on August 14, 2024

from raccoon_dataset.

Petros626 avatar Petros626 commented on August 14, 2024

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.

HridoyHazard avatar HridoyHazard commented on August 14, 2024

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.

Petros626 avatar Petros626 commented on August 14, 2024

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.

HridoyHazard avatar HridoyHazard commented on August 14, 2024

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.

Petros626 avatar Petros626 commented on August 14, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.