Ssd.pytorch: No such file or directory: 'test.txt

Created on 16 May 2019  路  6Comments  路  Source: amdegroot/ssd.pytorch

F:\Research\Pytorch-SSD-master\ssd.py馃挴 UserWarning: Implicit dimension choice for softmax has been deprecated. Change the call to include dim=X as an argument.
self.softmax(conf.view(-1, self.num_classes)), # conf preds
im_detect: 1/3 1.819s
im_detect: 2/3 3.539s
im_detect: 3/3 1.817s
Evaluating detections
Writing aeroplane VOC results file
Writing bicycle VOC results file
Writing bird VOC results file
Writing boat VOC results file
Writing bottle VOC results file
Writing bus VOC results file
Writing car VOC results file
Writing cat VOC results file
Writing chair VOC results file
Writing cow VOC results file
Writing diningtable VOC results file
Writing dog VOC results file
Writing horse VOC results file
Writing motorbike VOC results file
Writing person VOC results file
Writing pottedplant VOC results file
Writing sheep VOC results file
Writing sofa VOC results file
Writing train VOC results file
Writing tvmonitor VOC results file
VOC07 metric? Yes
Traceback (most recent call last):
File "F:/Research/Pytorch-SSD-master/eval.py", line 424, in
thresh=args.confidence_threshold)
File "F:/Research/Pytorch-SSD-master/eval.py", line 401, in test_net
evaluate_detections(all_boxes, output_dir, dataset)
File "F:/Research/Pytorch-SSD-master/eval.py", line 406, in evaluate_detections
do_python_eval(output_dir)
File "F:/Research/Pytorch-SSD-master/eval.py", line 163, in do_python_eval
ovthresh=0.5, use_07_metric=use_07_metric)
File "F:/Research/Pytorch-SSD-master/eval.py", line 250, in voc_eval
with open(imagesetfile, 'r') as f:
FileNotFoundError: [Errno 2] No such file or directory: 'test.txt'

how to solve it?

Most helpful comment

I konw about it . In line71 with file eval.py , source code is
imgsetpath = os.path.join(args.voc_root, 'VOC2007', 'ImageSets', 'Main', '{:s}.txt')
it ok in linux , while it cannot join path creately in windows. you can modify like this.
imgsetpath = os.path.join(args.voc_root, 'VOC2007', 'ImageSets', 'Main', '{}.txt')
btw, make sure the "txt" exists in the path you write in this line.

All 6 comments

I have the same problem. I'm sure it's a system path problem (windows and Linux are completely different). You need to specify the absolute path, eg..VOC2007ImageSets\Main\test.txt
How do you modify the number of detected pictures?

I have the same problem on a windows box. Which path needs to be absolute and where? config.py?

In the meantime I'll get my weights onto my Linux box and have a look if I am facing the same problems there.

@pinkerltm i have solved this error, you should fix path in eval.py 262th line :
with open(imagesetfile, 'r') as f:
change "imagesetfile" into " absolute path'', eg..VOC2007ImageSets\Main\test.txt

I konw about it . In line71 with file eval.py , source code is
imgsetpath = os.path.join(args.voc_root, 'VOC2007', 'ImageSets', 'Main', '{:s}.txt')
it ok in linux , while it cannot join path creately in windows. you can modify like this.
imgsetpath = os.path.join(args.voc_root, 'VOC2007', 'ImageSets', 'Main', '{}.txt')
btw, make sure the "txt" exists in the path you write in this line.

You can use val.txt instead of test.txt of VOC2012 dataset.

I konw about it . In line71 with file eval.py , source code is
imgsetpath = os.path.join(args.voc_root, 'VOC2007', 'ImageSets', 'Main', '{:s}.txt')
it ok in linux , while it cannot join path creately in windows. you can modify like this.
imgsetpath = os.path.join(args.voc_root, 'VOC2007', 'ImageSets', 'Main', '{}.txt')
btw, make sure the "txt" exists in the path you write in this line.

goooood!!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

squirrel16 picture squirrel16  路  5Comments

oarriaga picture oarriaga  路  4Comments

chienyiwang picture chienyiwang  路  3Comments

bassyess picture bassyess  路  5Comments

kouyichi picture kouyichi  路  5Comments