Some questions
Closed this issue · 3 comments
Hi,
It's an awesome project thanks for this, I tried to reproduce it and do the same in my city, but the manual is not that detailed and sometimes it is confusing. In the last few days I tried to make it work but I couldn't based on the read.me so I would have a few questions.
I am able to do the first three steps, and the test is fine:
python object_detection/builders/model_builder_test.py
.............
----------------------------------------------------------------------
Ran 13 tests in 0.066s
OK
Then we have to run the following:
./generate_tfrecord --folder=path/to/data_dir --train_ratio=.70
I suppose the path/to/data_dir
int this example is OurCamera/data/
folder.
It gives an error, I am still trying to figure out why, maybe I am doing something wrong but it looks like it gets str
type instead of bytes
:
(data) root@mlearning:~/data# python ./generate_tfrecord.py -folder=/root/data/data/ -train_ratio=.70
Running on /root/data/data/ with ratio 0.7
Traceback (most recent call last):
File "./generate_tfrecord.py", line 132, in <module>
tf.app.run()
File "/root/data/lib/python3.5/site-packages/tensorflow/python/platform/app.py", line 126, in run
_sys.exit(main(argv))
File "./generate_tfrecord.py", line 124, in main
tf_example = create_tf_example_from_jpg_xml(images_path+filename+'.jpg', labels_path+filename+'.xml')
File "./generate_tfrecord.py", line 82, in create_tf_example_from_jpg_xml
'image/filename': dataset_util.bytes_feature(jpg_file),
File "/root/data/models/research/object_detection/utils/dataset_util.py", line 30, in bytes_feature
return tf.train.Feature(bytes_list=tf.train.BytesList(value=[value]))
TypeError: '/root/data/data/images/2017-12-22 19:55:19.816746.jpg' has type str, but expected one of: bytes
You write unzip Unzip model in the data/models/ folder
, in that case the the data structure should look like this:
data/test.record data/train.record data/models/model/faster_rcnn_resnet101_coco_11_06_2017 data/models/model/train data/models/model/eval
Am I right?
I am still trying to make it work, but if you have any comments I would appreciate it..
Sorry didnt see this till now. Turning on notifications for this repo so I should see future messages.
-
For your question about unzipping the model in the data/models/ folder yes your structure looks correct.
-
Hmmm, I cant replicate the issue of line 82 of generate_tfrecord. What version of the tensorflow research are you using?
Hi,
I am using Python3.5 on Ubuntu. I installed tensorflow
with following command:
pip3 install --upgrade tensorflow
And the version what it is installed is: tensorflow (1.6.0)
Thanks.
Some other people has said that the problem came from : and spaces in the filenames for the images. You can try renaming all the files to remove the : and the " "
I dont have that problem on my system, but let me know if that solved your problem. If it did than I will have to find some way of replicating and fixing.