未验证 提交 2e97f197 编写于 作者: G George Ni 提交者: GitHub

[MOT] Fix mot source (#3061)

* fix mot_source

* fix mot_source, test=document_fix
上级 2b7a999d
......@@ -19,13 +19,15 @@ TrainDataset:
image_lists: ['mot17.train', 'caltech.all', 'cuhksysu.train', 'prw.train', 'citypersons.train', 'eth.train']
data_fields: ['image', 'gt_bbox', 'gt_class', 'gt_ide']
# for detection or reid evaluation, no use in MOT evaluation
EvalDataset:
!MOTDataSet
dataset_dir: dataset/mot
image_lists: ['citypersons.val', 'caltech.val'] # for detection
# image_lists: ['caltech.10k.val', 'cuhksysu.val', 'prw.val'] # for reid
image_lists: ['citypersons.val', 'caltech.val'] # for detection evaluation
# image_lists: ['caltech.10k.val', 'cuhksysu.val', 'prw.val'] # for reid evaluation
data_fields: ['image', 'gt_bbox', 'gt_class', 'gt_ide']
# for detection inference, no use in MOT inference
TestDataset:
!ImageFolder
dataset_dir: dataset/mot
......
......@@ -124,28 +124,6 @@ class MOTDataSet(DetDataset):
self.img_start_index[data_name] = img_index
img_index += len(self.img_files[data_name])
# check data directory, images and labels_with_ids
if len(self.img_files[data_name]) == 0:
continue
else:
# self.img_files[data_name] each line following this:
# {self.dataset_dir}/MOT17/images/...
first_path = self.img_files[data_name][0]
data_dir = first_path.replace(self.dataset_dir,
'').split('/')[1]
data_dir = os.path.join(self.dataset_dir, data_dir)
assert os.path.exists(data_dir), \
"The data directory {} does not exist.".format(data_dir)
data_dir_images = os.path.join(data_dir, 'images')
assert os.path.exists(data_dir), \
"The data images directory {} does not exist.".format(data_dir_images)
data_dir_labels_with_ids = os.path.join(data_dir,
'labels_with_ids')
assert os.path.exists(data_dir), \
"The data labels directory {} does not exist.".format(data_dir_labels_with_ids)
# record label_files
self.label_files[data_name] = [
x.replace('images', 'labels_with_ids').replace(
......
......@@ -25,6 +25,7 @@ from numbers import Integral
import cv2
import copy
import numpy as np
import random
import math
from .operators import BaseOperator, register_op
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册