Comments (17)
Hi,
I have also encountered this error. Seems like something is wrong in at least one of the annotations, an artificial solution is the following: in imdb.py
for b in range(len(boxes)):
if boxes[b][2] < boxes[b][0]:
boxes[b][0] = 0
assert (boxes[:, 2] >= boxes[:, 0]).all()
Hope this helps!
from py-faster-rcnn.
Hello yawadugyamfi, did you find a solution to your error? Would you share it with us please?
Never mind, I found the answer. There should be no <ymin>0</ymin>
nor <xmin>0</xmin>
in an object.
I changed that in the Annotations folder with the two commands (./ means the current folder is Annotations):
grep -rl '<ymin>0</ymin>' ./ | xargs sed -i 's#<ymin>0</ymin>#<ymin>1</ymin>#g'
and
grep -rl '<xmin>0</xmin>' ./ | xargs sed -i 's#<xmin>0</xmin>#<xmin>1</xmin>#g'
Now training is running smoothly. .
from py-faster-rcnn.
@marphil I get the following error:
Process Process-1:
Traceback (most recent call last):
File "/usr/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap
self.run()
File "/usr/lib/python2.7/multiprocessing/process.py", line 114, in run
self._target(_self._args, *_self._kwargs)
File "./tools/train_faster_rcnn_alt_opt.py", line 122, in train_rpn
roidb, imdb = get_roidb(imdb_name)
File "./tools/train_faster_rcnn_alt_opt.py", line 67, in get_roidb
roidb = get_training_roidb(imdb)
File "/media/dl/c0d34b51-8a78-4364-bc19-35003bf01885/RCNN/py-faster-rcnn/tools/../lib/fast_rcnn/train.py", line 118, in get_training_roidb
imdb.append_flipped_images()
File "/media/dl/c0d34b51-8a78-4364-bc19-35003bf01885/RCNN/py-faster-rcnn/tools/../lib/datasets/imdb.py", line 106, in append_flipped_images
boxes = self.roidb[i]['boxes'].copy()
File "/media/dl/c0d34b51-8a78-4364-bc19-35003bf01885/RCNN/py-faster-rcnn/tools/../lib/datasets/imdb.py", line 67, in roidb
self._roidb = self.roidb_handler()
File "/media/dl/c0d34b51-8a78-4364-bc19-35003bf01885/RCNN/py-faster-rcnn/tools/../lib/datasets/pascal_voc.py", line 103, in gt_roidb
for index in self.image_index]
File "/media/dl/c0d34b51-8a78-4364-bc19-35003bf01885/RCNN/py-faster-rcnn/tools/../lib/datasets/pascal_voc.py", line 204, in _load_pascal_annotation
x1 = float(bbox.find('xmin').text)
ValueError: invalid literal for float(): 737,
from py-faster-rcnn.
@marphil in which function you wrote those lines?
from py-faster-rcnn.
@DiegoPortoJaccottet I got sed: no input files
from py-faster-rcnn.
@marphil that worked for me!.
from py-faster-rcnn.
@DiegoPortoJaccottet your fix worked for me, thanks! The @marphil fix produces the same assertion error in my case.
from py-faster-rcnn.
@DiegoPortoJaccottet Even i got sed : no input files. I have my annotation files in that folder ( *.xml)
from py-faster-rcnn.
@harora
You got 'sed: no input files' from the commands I described or from Faster-RCNN?
from py-faster-rcnn.
@moyans I get the same error with you.
y2= float(bbox.find('ymax').text)
ValueError: invalid literal for float(): 196006001002176.jpg
Have you found any solution to it? Thank you
from py-faster-rcnn.
from py-faster-rcnn.
@moyans 196006001002176.jpg is very odd. My images are usually "000000.jpg", same as VOC2007.
And I have removed "-1" from the lines below
x1 = float(bbox.find( 'xmin').text)
y1 = float(bbox.find('ymin').text)
x2 = float(bbox.find('xmax').text)
y2 = float(bbox.find('ymax').text)
from py-faster-rcnn.
from py-faster-rcnn.
in the Annotation folder I run
grep -rl '<ymin>0</ymin>' ./ | xargs sed -i 's#<ymin>0</ymin>#<ymin>1</ymin>#g'
I got: sed : no input files
just like @harora . I want to know why. @DiegoPortoJaccottet
from py-faster-rcnn.
@moyans Thanks for your help. I have solved the error. I found an error in "output.txt", i.e. 002175.jpg c 669 155 769 **196006001002176.jpg p 207 188 229 257. What puzzles me is that I cannot find error in .xml. Anyway, it is solved. Thank you again!
from py-faster-rcnn.
I replaced xmin 0 and ymin 0 with xmin 1 and ymin 1, all things resolved!
see more #34
from py-faster-rcnn.
in the Annotation folder I run
grep -rl '<ymin>0</ymin>' ./ | xargs sed -i 's#<ymin>0</ymin>#<ymin>1</ymin>#g'
I got:sed : no input files
just like @harora . I want to know why. @DiegoPortoJaccottet
replace 0 with 0.0
from py-faster-rcnn.
Related Issues (20)
- Error when run the demo
- 关于faster rcnn, 已经解决了win10下关于faster rcnn下训练自己数据集的问题
- error while making caffe HOT 1
- gpu_nms does not work. HOT 2
- Why do an operation that is repeated and may bring errors?
- win10 nms_gpu nvcc fatal : Host compiler targets unsupported OS.
- Anchors
- Need help in creating dataset class for multilabel object detection in a single image
- How to remove false detection (False Positives) in Faster RCNN
- How to add background as the training data? The background image is no goals. HOT 4
- so i have to compile cython with cuda or nvcc ?? HOT 2
- how to solve "raise EnvironmentError('The nvcc binary could not be ' OSError: The nvcc binary could not be located in your $PATH. Either add it to your path, or set $CUDAHOME make: *** [all] Error 1"
- difference between fast_rcnn, faster_rcnn_alt_opt and faster_rcnn_end2end
- image invalid, skipping
- continue training with .caffemodel HOT 1
- 2022
- two sibling layers in RPN are fully connected or 1x1 conv layers? HOT 2
- how comput stride size of vgg outputs?
- Object Detection Failure in FRCNN
- Do I need to install caffe if I just want to run demo.py? Or I can just start building the Cython modules?
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 py-faster-rcnn.