Reference article: https://blog.csdn.net/10km/article/details/64641322
I think my xml file does not need to have a rectangular frame minus 1, so all in front of -1 plus a pound, the - 1 are commented out.
Error: File "/home/drl/new/Faster-RCNN-TensorFlow-Python3.5/lib/datasets/imdb.py", line 119, in append_flipped_images assert (boxes[:, 2] >= boxes[:, 0]).all()
The solution is: will /home/drl/new/Faster-RCNN-TensorFlow-Python3.5/lib/datasets/pascal_voc.py open, the 162-165 line after the code of -1 are commented out! ! !
When re-run train.py file, first
1, while all models /home/drl/new/Faster-RCNN-TensorFlow-Python3.5/default/voc_2007_trainval/ file folder backup, then delete
2, also To backup cache file under /home/drl/new/Faster-RCNN-TensorFlow-Python3.5/data/cache/ folder, and then delete
Then runpython train.py
success!
Training finished, now run demo.py file, at the command line enter the code python demo.py
error:
File "/home/drl/anaconda3/envs/tensorflow-gpu/lib/python3.5/site-packages/tensorflow/python/framework/ops.py", line 1204, in __init__
self._traceback = self._graph._extract_stack() # pylint: disable=protected-access
InvalidArgumentError (see above for traceback): Assign requires shapes of both tensors to match. lhs shape= [21] rhs shape= [2]
[[Node: save/Assign_2 = Assign[T=DT_FLOAT, _class=["loc:@vgg_16/cls_score/biases"], use_locking=true, validate_shape=true, _device="/job:localhost/replica:0/task:0/gpu:0"](vgg_16/cls_score/biases, save/RestoreV2_2/_5)]]
Error reason is:
1. did not demo.py the code, line 33 rows into their own category:
2. did not demo.py the code, line 33 rows need to test the image name was changed to the name of the picture you want to test yourself:
read:
3. There is no need to test their own pictures placed in the folder /home/drl/new/Faster-RCNN-TensorFlow-Python3.5/data/demo/
Read:
Then re-run demo.py file: