未验证 提交 5c129feb 编写于 作者: K Kaipeng Deng 提交者: GitHub

fix gt_id overflow and add README for windows (#2873)

上级 d1e12efc
......@@ -94,6 +94,7 @@ dataset/coco/
--class_num=${category_num}
- 通过设置`export CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7`指定8卡GPU训练。
- 若在Windows环境下训练模型,建议设置`--use_multiprocess=False`
- 可选参数见:
python train.py --help
......
......@@ -95,6 +95,7 @@ Please make sure that pre-trained model is downloaded and loaded correctly, othe
--class_num=${category_num}
- Set `export CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7` to specifiy 8 GPUs to train.
- It is recommended to set `--use_multiprocess=False` when training on Windows.
- For more help on arguments:
python train.py --help
......
......@@ -104,7 +104,6 @@ class DataSetReader(object):
if box[2] <= 0 and box[3] <= 0:
continue
img['gt_id'][gt_index] = np.int32(target['id'])
img['gt_boxes'][gt_index] = box
img['gt_labels'][gt_index] = \
self.category_to_id_map[target['category_id']]
......@@ -121,7 +120,6 @@ class DataSetReader(object):
assert os.path.exists(img['image']), \
"image {} not found.".format(img['image'])
box_num = cfg.max_box_num
img['gt_id'] = np.zeros((cfg.max_box_num), dtype=np.int32)
img['gt_boxes'] = np.zeros((cfg.max_box_num, 4), dtype=np.float32)
img['gt_labels'] = np.zeros((cfg.max_box_num), dtype=np.int32)
for k in ['date_captured', 'url', 'license', 'file_name']:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册