waymo_2d_tracking
waymo_2d_tracking copied to clipboard
No such file or directory: '.../annotations.json'
Hi, Thanks for sharing your code. I got this directory tree after extract images and json from TFRcord:
/content/data/waymo/coco_format/training
├── segment-10017090168044687777_6380_000_6400_000_with_camera_labels.tfrecord
│ ├── 10017090168044687777_6380_000_6400_000
│ └── annotations.json
├── segment-10023947602400723454_1120_000_1140_000_with_camera_labels.tfrecord
│ ├── 10023947602400723454_1120_000_1140_000
│ └── annotations.json
├── segment-1005081002024129653_5313_150_5333_150_with_camera_labels.tfrecord
│ ├── 1005081002024129653_5313_150_5333_150
│ └── annotations.json
├── segment-10061305430875486848_1080_000_1100_000_with_camera_labels.tfrecord
│ ├── 10061305430875486848_1080_000_1100_000
│ └── annotations.json
├── segment-10072140764565668044_4060_000_4080_000_with_camera_labels.tfrecord
│ ├── 10072140764565668044_4060_000_4080_000
.
.
.
I stuck on step Training with multi GPUs by running code:
./detnet/trainer/launch.sh train.py @detnet/configs/detectron2.cfg --data-root=${EXPORTED_DATASET_ROOT} --batch-size=1 --batch-size-per-gpu --sync-bn --arch=detectron2:Misc/cascade_mask_rcnn_X_152_32x8d_FPN_IN5k_gn_dconv.yaml
mine modified code in colab:
%%shell
eval "$(conda shell.bash hook)" # copy conda command to shell
conda activate waymo_2d_tracking
EXPORTED_DATASET_ROOT='/content/data/waymo/coco_format'
cd /content/waymo_2d_tracking
./detnet/trainer/launch.sh train.py @/content/waymo_2d_tracking/detnet/configs/detectron2.cfg --data-root=${EXPORTED_DATASET_ROOT} --batch-size=1 --batch-size-per-gpu --sync-bn --arch=detectron2:Misc/cascade_mask_rcnn_X_152_32x8d_FPN_IN5k_gn_dconv.yaml
I got this error:
loading annotations into memory...
Traceback (most recent call last):
File "train.py", line 18, in <module>
for mode in ('train', 'test')}
File "train.py", line 18, in <dictcomp>
for mode in ('train', 'test')}
File "/content/waymo_2d_tracking/data/__init__.py", line 130, in create_dataset
dataset = Dataset(training_root, training_root / 'annotations.json', ingore_empty=ingore_empty, bgr=bgr)
File "/content/waymo_2d_tracking/data/__init__.py", line 89, in __init__
super(Dataset, self).__init__(images_root, annotations)
File "/content/waymo_2d_tracking/detnet/data/coco.py", line 142, in __init__
self.coco = COCO(annotations)
File "/usr/local/envs/waymo_2d_tracking/lib/python3.7/site-packages/pycocotools/coco.py", line 84, in __init__
dataset = json.load(open(annotation_file, 'r'))
FileNotFoundError: [Errno 2] No such file or directory: '/content/data/waymo/coco_format/training/annotations.json'
Apparently, your code expected an annotations.json
underneath the ${EXPORTED_DATASET_ROOT}/training
folder, but the current directory tree I got from [waymo_to_coco.py](https://github.com/xuyuan/waymo_2d_tracking/blob/master/waymo_to_coco.py)
conflict with that.
Is there anything wrong I made?