Duankaiwen / CenterNet

Codes for our paper "CenterNet: Keypoint Triplets for Object Detection" .
MIT License
1.86k stars 384 forks source link

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

Open lzw0515 opened 4 years ago

lzw0515 commented 4 years ago

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"], trainsplit) for in range(threads)] File "train.py", line 193, in training_dbs = [datasets[dataset](configs["db"], trainsplit) 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 commented 4 years ago

@Duankaiwen

lzw0515 commented 4 years ago

I have solved the problem

KelvinHuang666 commented 4 years ago

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

KelvinHuang666 commented 4 years ago

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

KelvinHuang666 commented 4 years ago

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

lzw0515 commented 4 years ago

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

KelvinHuang666 commented 4 years ago

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