CenterNet icon indicating copy to clipboard operation
CenterNet copied to clipboard

Help!No such file or directory ../../instances_trainval2014.json

Open lzw0515 opened this issue 5 years ago • 7 comments

when I use python train.py CenterNet-104,I got the error. Traceback (most recent call last): File "train.py", line 193, in training_dbs = [datasets[dataset](configs["db"], train_split) for _ in range(threads)] File "train.py", line 193, in training_dbs = [datasets[dataset](configs["db"], train_split) for _ in range(threads)] File "/home/zhouwei_lou/CenterNet-master/db/coco.py", line 68, in init self._load_data() File "/home/zhouwei_lou/CenterNet-master/db/coco.py", line 79, in _load_data self._extract_data() File "/home/zhouwei_lou/CenterNet-master/db/coco.py", line 110, in _extract_data self._coco = COCO(self._label_file) File "data/coco/PythonAPI/pycocotools/coco.py", line 86, in init dataset = json.load(open(annotation_file, 'r')) FileNotFoundError: [Errno 2] No such file or directory: '../data/coco/annotations/instances_trainval2014.json'

I check the file, anybody who solved this probiem before?

lzw0515 avatar Nov 02 '19 05:11 lzw0515

@Duankaiwen

lzw0515 avatar Nov 02 '19 05:11 lzw0515

I have solved the problem

lzw0515 avatar Nov 02 '19 14:11 lzw0515

how did U solve it???I meet the same problem,Thanks

KelvinHuang666 avatar Nov 06 '19 06:11 KelvinHuang666

how did U solve it???I meet the same problem,Thanks

KelvinHuang666 avatar Nov 06 '19 06:11 KelvinHuang666

how did U solve it???I meet the same problem,Thanks

KelvinHuang666 avatar Nov 06 '19 06:11 KelvinHuang666

how did U solve it???I meet the same problem,Thanks

The key is in this path, '../' is Global path, I use './' to replase it You can manually set the wrong path, for me, I change one code at coco.py(db/coco.py) File "coco.py", line 19, I add"data_dir = './data', and then it's OK or just 'data' is OK

lzw0515 avatar Nov 06 '19 07:11 lzw0515

config/CenterNet-104.json "data_dir": "../data"-->"data_dir": "./data" according to It works,thanks a lot.

KelvinHuang666 avatar Nov 06 '19 07:11 KelvinHuang666