HKUST-Aerial-Robotics / Stereo-RCNN

Code for 'Stereo R-CNN based 3D Object Detection for Autonomous Driving' (CVPR 2019)
MIT License
690 stars 177 forks source link

How do you divide these cars in validation set to Easy/Moderate/Hard #33

Open detectRecog opened 5 years ago

detectRecog commented 5 years ago

Hello, I divide cars into different categories by a function written by myself. However, the evaluation on your validation set seems quite different(3D iou > 0.7): Easy: 0.667 Moderate: 0.357, Hard: 0.156

Here is my function for classifying cars into different difficulties:

    HEIGHT = (40, 25, 25)
    OCCLUSION = (0, 1, 2)
    TRUNCATION = (0.15, 0.3, 0.5)
    def _get_difficulty(self, obj):
        """This filters an object by difficulty.
        Args:
            obj: An instance of ground-truth Object Label
            difficulty: An int defining the KITTI difficulty rate
        Returns: True or False depending on whether the object
            matches the difficulty criteria.
        """
        difficulty = 0
        bbox = obj.boxes[0].box
        while not ((obj.occlusion <= self.OCCLUSION[difficulty]) and
         (obj.truncate <= self.TRUNCATION[difficulty]) and
         (bbox[3] - bbox[1]) >= self.HEIGHT[difficulty]):
            difficulty += 1
            if difficulty > 2:
                break
        return difficulty

Could you please tell me where is wrong?