xingyizhou / CenterTrack

Simultaneous object detection and tracking using center points.
MIT License
2.37k stars 526 forks source link

got AP=0 ,when I use nuScenes dataset with only pedestrain and car. #60

Open wly-ai-bj opened 4 years ago

wly-ai-bj commented 4 years ago

I use nuScenes dataset for 3D detection, but when I test, I got the result of AP=0. Here are some changes I make for 2 categories. 1、rewrite the contants.py and utils.py files under the nuscenes/eval/detection folder. contants.py file, change as follows:

DETECTION_NAMES = ['car','pedestrian']
PRETTY_DETECTION_NAMES = {'car': 'Car',
                          'pedestrian': 'Pedestrian'}

2、utils.py file, change as follows: function category_to_detection_name:

detection_mapping = {
        'vehicle.bus.bendy': 'car',
        'vehicle.bus.rigid': 'car',
        'vehicle.car': 'car',
        'human.pedestrian.adult': 'pedestrian',
        'human.pedestrian.child': 'pedestrian',
        'human.pedestrian.construction_worker': 'pedestrian',
        'human.pedestrian.police_officer': 'pedestrian',
        'vehicle.truck': 'car'
    }

function detection_name_to_rel_attributes:

if detection_name in ['pedestrian']:
        rel_attributes = ['pedestrian.moving', 'pedestrian.sitting_lying_down', 'pedestrian.standing']
    elif detection_name in ['car', 'bus', 'truck']:
        rel_attributes = ['vehicle.moving', 'vehicle.parked', 'vehicle.stopped']
    else:
        raise ValueError('Error: %s is not a valid detection class.' % detection_name)

3、convert_nuScenes.py file, change as follows:

CATS = ['car', 'pedestrian']

4、rewrite the config file as detection_person_car.json

"class_range": {
      "car": 50,
      "pedestrian": 40
    }

What's the problem? Why I got AP=0? Can you help me ?

xingyizhou commented 4 years ago

Are you able to reproduce the performance without changing it to just car and pedestrian? The default nuScenes eval API should print metrics for each category separately, and you can directly read from that.

wly-ai-bj commented 4 years ago

In my project, car include "car, bus, truck"。 So I can't read these informations from the default nuScenes eval API.