This is my configuration file when I visualized Dior-R ,
{
"load_type": "pkl",
"img_dir": "/data/dataset/DIOR/JPEGImages-test",
"ann_dir": "/data1/bk/6742.pkl",
"classes": "dior",
"prior_annfile": null,
"merge_type": "addition",
"load_nproc": 10,
"skip_empty": false,
"random_vis": false,
"ids": null,
"show_off": true,
"save_dir": "vis_bk/dior",
"vis_nproc": 10,
"shown_btype": null,
"shown_names": "./vis_configs/dior/short_names.txt",
"score_thr": 0.2,
"colors": "./vis_configs/dior/colors.txt",
"thickness": 3.0,
"text_off": true,
"font_size": 10,
"wait_time": 0
}
The following error occurs:
Traceback (most recent call last):
File "visualize.py", line 230, in
main()
File "visualize.py", line 143, in main
nproc=args.load_nproc)
File "/data/bk/OBBDetection/BboxToolkit/BboxToolkit/datasets/io.py", line 54, in load_pkl
old_classes, contents = data['cls'], data['content']
TypeError: list indices must be integers or slices, not str
I output the data parsed by .pkl this is
array([[ 7.8454449e+02, 6.3927423e+02, 2.6410254e+01, 8.1578226e+00,
-1.2265325e-02, 7.9247594e-01],
[ 5.6819104e+02, 6.5477740e+02, 1.5486428e+01, 8.1747618e+00,
1.5659013e+00, 7.7006650e-01],
[ 5.7608038e+02, 6.5416187e+02, 1.5025672e+01, 8.0598936e+00,
1.5541477e+00, 6.8269205e-01],
[ 5.7347760e+02, 6.9571722e+02, 1.3365779e+01, 5.5745769e+00,
-1.5615332e+00, 4.7462189e-01],
[ 5.7240784e+02, 6.5443042e+02, 1.5609086e+01, 1.1678979e+01,
1.5074093e+00, 4.4766316e-01],
[ 5.3823401e+02, 6.5405450e+02, 1.7242418e+01, 1.0737660e+01,
-1.5569979e+00, 2.6717269e-01],
[ 6.1477234e+02, 1.3902811e+02, 3.6538612e+01, 8.9332752e+00,
1.4462376e-01, 1.9412568e-01],
[ 5.7195233e+02, 6.5014233e+02, 1.4650148e+01, 8.8534908e+00,
5.1303148e-02, 1.0566589e-01],
[ 5.4264069e+02, 6.5394983e+02, 1.8320833e+01, 1.6436756e+01,
1.5667925e+00, 5.3098477e-02]], dtype=float32), array([], shape=(0, 6), dtype=float32)]
I would like to ask you what is the problem, looking forward to your reply