Coder Social home page Coder Social logo

kitti_native_evaluation's Introduction

kitti_native_evaluation

Disclaimer:

  • These days, I found this code to be too slow for the turnover rate in deep learning development. I personally switched to using numba as done in https://github.com/traveller59/second.pytorch to compute AP in much faster times (~10 seconds per full run on validation set). I recommend you take a look if you need faster code with python integration.

Updates:

  • 17/12/2017: Initial release.
  • 18/02/2020: This code complies with the 40 recall point change on the official KITTI website.
  • 18/02/2020: I am not actively developing this repository anymore. This will be the last update for the time being.

This code is based on Bo Li's repository: https://github.com/prclibo/kitti_eval with the main differences being some code cleanup and additional AHS metric described in our paper: Joint 3D Proposal Generation and Object Detection from View Aggregation

evaluate_object_3d_offline.cpp evaluates your KITTI detection locally on your own computer using your validation data selected from KITTI training dataset, with the following metrics:

  • overlap on image (AP)
  • oriented overlap on image (AOS)
  • overlap on ground-plane (AP)
  • oriented overlap on ground-plane (AHS)
  • overlap in 3D (AP)
  • oriented overlap in 3D (3D AHS)

Compilation:

Clone the repo using: git clone https://github.com/asharakeh/kitti_native_evaluation.git

From inside the main folder do:

  1. cmake ./
  2. make

Usage:

Run the evalutaion by:

./evaluate_object_3d_offline groundtruth_dir result_dir

Note that you don't have to detect over all KITTI training data. The evaluator only evaluates samples whose result files exist.

Data Format:

The detection format should be simillar to the KITTI dataset label format with 15 columns representing:

Values Name Description
1 type Describes the type of object: 'Car', 'Van', 'Truck', 'Pedestrian', 'Person_sitting', 'Cyclist', 'Tram', 'Misc' or 'DontCare'
1 truncated -1
1 occluded -1
1 alpha Observation angle of object, ranging [-pi..pi]
4 bbox 2D bounding box of object in the image (0-based index): contains left, top, right, bottom pixel coordinates
3 dimensions 3D object dimensions: height, width, length (in meters)
3 location 3D object location x,y,z in camera coordinates (in meters)
1 rotation_y Rotation ry around Y-axis in camera coordinates [-pi..pi]
1 score Only for results: Float, indicating confidence in detection, needed for p/r curves, higher is better.

Example:

type truncated occluded alpha bbox dimensions location rotation_y score
Pedestrian -1 -1 0.29 873.70 152.10 933.44 256.07 1.87 0.50 0.90 5.42 1.50 13.43 0.67 0.99

Citation:

If you are using this code, please cite our paper:

Joint 3D Proposal Generation and Object Detection from View Aggregation

@article{ku2017joint, title={Joint 3D Proposal Generation and Object Detection from View Aggregation}, author={Ku, Jason and Mozifian, Melissa and Lee, Jungwook and Harakeh, Ali and Waslander, Steven}, journal={arXiv preprint arXiv:1712.02294}, year={2017} }

kitti_native_evaluation's People

Contributors

asharakeh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

kitti_native_evaluation's Issues

Can someone explain AP and AOS to me?

Hello. I wanted to understand the following terms:

  • overlap on image (AP)
  • oriented overlap on image (AOS)
  • overlap on ground-plane (AP)
  • oriented overlap on ground-plane (AHS)
  • overlap in 3D (AP)
  • oriented overlap in 3D (3D AHS)

As far as I understand (do correct me if I am wrong), kitti measures the 3D intersection over union between the 3D bounding boxes. In light of that, can you explain to me what all the above terms mean? Thank you!

Changed Recall Position Numbers

Hello!
According to the official website of KITTI,
"On 08.10.2019, we have followed the suggestions of the Mapillary team in their paper Disentangling Monocular 3D Object Detection and use 40 recall positions instead of the 11 recall positions proposed in the original Pascal VOC benchmark."
Do we need to make a change in the corresponding code?

Thank you!

How the result.txt format looks like

Hi, When I copy the ground truth label to my prediction directory and run evaluation file, if I am right, AP is supposed to be 1 since the ground truth and prediction are the same. However, the final metric is pretty low. I am pondering if the prediction format is different from the ground truth label, but haven't figured out the solution. Could you give me some hints? Thanks

Your script doesn't work

I tried to use your script but it just creates an empty folder named plot. My detection file looks like this (I am trying to evaluate 3D object detection):

Pedestrian -1 -1 -10 699 152 839 307 1.79355319183269 2.864534433991117 1.255055899107495 2.0412647769700696 1.4699194190575617 9.589653289755141 0.01 0.9991099

stopped with segmentation fault

First, thanks for your amazing work!
While it's really helpful, I really need your help.
Here are the summary I'm currently seeing.

car_detection_AP : 85.031853 81.267220 74.636650
sh: 1: gnuplot: not found
sh: 1: gnuplot: not found
Error: /undefinedfilename in (car_detection_AP.eps)
Operand stack:

Execution stack:
%interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push
Dictionary stack:
--dict:961/1684(ro)(G)-- --dict:0/20(G)-- --dict:78/200(L)--
Current allocation mode is local
Last OS error: No such file or directory
GPL Ghostscript 9.26: Unrecoverable error, exit code 1
sh: 1: pdfcrop: not found
car_orientation_AOS : 84.987823 79.064232 69.322250
sh: 1: gnuplot: not found
sh: 1: gnuplot: not found
Error: /undefinedfilename in (car_orientation_AOS.eps)
Operand stack:

Execution stack:
...
...
...
Execution stack:
%interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push
Dictionary stack:
--dict:961/1684(ro)(G)-- --dict:0/20(G)-- --dict:78/200(L)--
Current allocation mode is local
Last OS error: No such file or directory
GPL Ghostscript 9.26: Unrecoverable error, exit code 1
sh: 1: pdfcrop: not found

When it starts evaluating bird's eye detection, a critical segmentation fault occurs, and it's all stopped.
It has been happening in other similar projects, but I can't figure out what the real issues are.
It will be so helpful if you could give me some piece of hints. Thanks in advance.

Apart from this issue, I have one more question.
How can we decide the 16th value 'score/confidence' in the label? This time, I just put any random number, but I have no idea of calculating the value. Does it come from 2D Detector which usually outputs confidence probability by softmax classification?

Again, thanks for you work, and looking forward to seeing your reply!

AN ERROR :couldn't read

ERROR: Couldn't read: 002863.txt of ground truth. Please write me an email!
An error occured while processing your results.

Dear author, hello. I have encountered this problem now, and I really do not know how to solve it. How can I solve this problem

The meaning of the output

Hello @asharakeh
I used your script to evaluate the result. But I am confused the meaning of those outputs. For example,

  1. when the script was running, it outputted: car_detection_AP : 90.716682 89.915375 89.342400. Are these three numbers mean the AP of model on three difficulty level: easy, moderate and hard?
  2. The script created a new folder named 'plot'. In this folder, there are two types of files, '.txt' and '.gp', could you pls explain the content in these files? '.gp' files are used to plot the AP curve? If 'yes', how to do?
  3. Also, the script outputted three '.txt' files: 'stats_car_detection.txt', 'stats_car_detection_ground.txt', 'stats_car_orientation.txt', what's the meaning of the numbers in these three files?

Thank you for your help!!

AP calculate problem ?

hi~
@asharakeh
I m not quite understand the AP here now. I think it should sum[0]/41*100 because here it separate recall into 41 slices.
`
void printAp(string file_name, vector vals[]){

float sum[3] = {0, 0, 0};
for (int v = 0; v < 3; ++v)
for (int i = 0; i < vals[v].size(); i = i + 4)
sum[v] += vals[v][i];
printf("%s AP: %f %f %f\n", file_name.c_str(), sum[0] / 11 * 100, sum[1] / 11 * 100, sum[2] / 11 * 100);

}
`
Also i m a little confused about less than 41 thresholds, because if there is only 20 thresholds. The recall and the precision are not match. And the AP here should be sum[0]/20.
Extreme case, only one threshold, precision 1 but the result will look like this:
0 1 1 1
0.025 0 0 0
0.050 0 0 0
0.075 0 0 0
0.100 0 0 0
0.125 0 0 0
0.150 0 0 0
0.175 0 0 0

Maybe i had some misunderstanding here. Can u help me ?
Thanks a lot !!!

Error: /undefinedfilename in (car_orientation_3D_AHS.eps)

When I evaluate the KITTI dataset result,there was a error. I dont know how to solve it? I am looking forward to your reply!

done.
car_detection_AP : 35.000000 79.857147 84.663734
sh: 1: gnuplot: not found
sh: 1: gnuplot: not found
Error: /undefinedfilename in (car_detection_AP.eps)
Operand stack:

Execution stack:
%interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push
Dictionary stack:
--dict:960/1684(ro)(G)-- --dict:0/20(G)-- --dict:77/200(L)--
Current allocation mode is local
Last OS error: No such file or directory
GPL Ghostscript 9.26: Unrecoverable error, exit code 1
sh: 1: pdfcrop: not found
car_orientation_AOS : 18.006918 38.727802 40.937248
sh: 1: gnuplot: not found
sh: 1: gnuplot: not found
Error: /undefinedfilename in (car_orientation_AOS.eps)
Operand stack:

Execution stack:
%interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push
Dictionary stack:
--dict:960/1684(ro)(G)-- --dict:0/20(G)-- --dict:77/200(L)--
Current allocation mode is local
Last OS error: No such file or directory
GPL Ghostscript 9.26: Unrecoverable error, exit code 1
sh: 1: pdfcrop: not found
car_detection_BEV_AP : 35.000000 82.357140 87.229523
sh: 1: gnuplot: not found
sh: 1: gnuplot: not found
Error: /undefinedfilename in (car_detection_BEV_AP.eps)
Operand stack:

Execution stack:
%interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push
Dictionary stack:
--dict:960/1684(ro)(G)-- --dict:0/20(G)-- --dict:77/200(L)--
Current allocation mode is local
Last OS error: No such file or directory
GPL Ghostscript 9.26: Unrecoverable error, exit code 1
sh: 1: pdfcrop: not found
car_orientation_BEV_AHS : 8.245552 38.986542 40.833549
sh: 1: gnuplot: not found
sh: 1: gnuplot: not found
Error: /undefinedfilename in (car_orientation_BEV_AHS.eps)
Operand stack:

Execution stack:
%interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push
Dictionary stack:
--dict:960/1684(ro)(G)-- --dict:0/20(G)-- --dict:77/200(L)--
Current allocation mode is local
Last OS error: No such file or directory
GPL Ghostscript 9.26: Unrecoverable error, exit code 1
sh: 1: pdfcrop: not found
car_detection_3D_AP : 35.000000 77.285713 82.028503
sh: 1: gnuplot: not found
sh: 1: gnuplot: not found
Error: /undefinedfilename in (car_detection_3D_AP.eps)
Operand stack:

Execution stack:
%interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push
Dictionary stack:
--dict:960/1684(ro)(G)-- --dict:0/20(G)-- --dict:77/200(L)--
Current allocation mode is local
Last OS error: No such file or directory
GPL Ghostscript 9.26: Unrecoverable error, exit code 1
sh: 1: pdfcrop: not found
car_orientation_3D_AHS : 8.245552 36.737556 38.581890
sh: 1: gnuplot: not found
sh: 1: gnuplot: not found
Error: /undefinedfilename in (car_orientation_3D_AHS.eps)
Operand stack:

Execution stack:
%interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push
Dictionary stack:
--dict:960/1684(ro)(G)-- --dict:0/20(G)-- --dict:77/200(L)--
Current allocation mode is local
Last OS error: No such file or directory
GPL Ghostscript 9.26: Unrecoverable error, exit code 1
sh: 1: pdfcrop: not found

KITTI_evaluation

Can you provide a python code for evaluation in kitti dataset , I failed in cmake kitti_native_evaluation. Thanks for you reply!

Problems with Evaluations

Hi,

I have been using a new dataset but it has been built on the same format as KITTI. I am having trouble with the evaluation script. When I run the evaluation script to evaluate all the checkpoints, nothing is written in the results file. I am attaching a screenshot:
image

This is how it looks. However, I tried with just 50 samples of the same dataset and it provided me with the following output file:

image

Now when I follow the readme and evaluate individual checkpoints, I get only the Car Detection AP and then a segmentation fault.

Did anyone have the same problem?

Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.