Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Object Detection: About KITTI format #992

Closed
skyzhao3q opened this issue Aug 23, 2016 · 13 comments
Closed

Object Detection: About KITTI format #992

skyzhao3q opened this issue Aug 23, 2016 · 13 comments

Comments

@skyzhao3q
Copy link

From the Doc of https://github.com/NVIDIA/DIGITS/blob/v4.0.0-rc.3/digits/extensions/data/objectDetection/README.md

The label files contain the following information, which can be read and
written using the matlab tools (readLabels.m, writeLabels.m) provided within
this devkit. All values (numerical or strings) are separated via spaces,
each row corresponds to one object. The 15 columns represent:

Actually it should be 16 columns(1+1+1+1+4+3+3+1+1) as defined below

Values Name Description


1 type Describes the type of object: 'Car', 'Van', 'Truck',
'Pedestrian', 'Person_sitting', 'Cyclist', 'Tram',
'Misc' or 'DontCare'
1 truncated Float from 0 (non-truncated) to 1 (truncated), where
truncated refers to the object leaving image boundaries
1 occluded Integer (0,1,2,3) indicating occlusion state:
0 = fully visible, 1 = partly occluded
2 = largely occluded, 3 = unknown
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.

But when I read the label txt file , It is 15 columns.
for example

Car 0.00 0 -1.58 587.01 173.33 614.12 200.12 1.65 1.67 3.64 -0.65 1.71 46.70 -1.59
Cyclist 0.00 0 -2.46 665.45 160.00 717.93 217.99 1.72 0.47 1.65 2.45 1.35 22.10 -2.35
Pedestrian 0.00 2 0.21 423.17 173.67 433.17 224.03 1.60 0.38 0.30 -5.87 1.63 23.11 -0.03
DontCare -1 -1 -10 650.19 175.02 668.98 210.48 -1 -1 -1 -1000 -1000 -1000 -10

Q1:
If 15 columns is right, is that the score field is not be used ?

I want to create my own label file. but I don't have information of dimensions , location and so on.
I think it should be set by default values like 0 or -1.
Q2:
What is the default value of these column ? or How should I do when I don't have the information of any column

thank you!

@gheinrich
Copy link
Contributor

Hello @skyzhao3q, the 16th column (score) in KITTI is only used when you make a submission to the KITTI web site. When training a model in DIGITS, you don't have to provide a score and if you do, the value will be ignored.

When you create a dataset, DIGITS will encode the first 15 fields into the label database. However if you use DetectNet, only those fields are used:

  • type,
  • truncated,
  • bbox

You can set other fields to zero if you create your own dataset.

Note that if you create your own dataset, it is important to ensure that your objects have a size of around 100 to 200 pixels in the image.

@skyzhao3q
Copy link
Author

@gheinrich thx

@harsmac
Copy link

harsmac commented Apr 11, 2017

hey the order is [top,left,down,right] for the 2D bounding box

@tylerbuchman
Copy link

@code-Assasin I am pretty sure from looking at the Kitti images and their labels that the order is [left, top, right, bottom]

@erik78se
Copy link

x_min, y_min, x_max, y_max

Looking at this image: https://devblogs.nvidia.com/parallelforall/wp-content/uploads/2016/07/Figure5-624x76.png

@chandanv2
Copy link

Hey do we need matlab support for digits to get the accuracy values and all the visualizations and outputs? Since the kitti data preparation python file generates .m files.
@skyzhao3q @gheinrich

@kargarisaac
Copy link

is there any code to convert tracklet_labels.xml file into text files?
I have downloaded data from http://www.cvlibs.net/datasets/kitti/raw_data.php and want to convert labels to files same as labels from http://www.cvlibs.net/datasets/kitti/eval_object.php?obj_benchmark=3d

@acmaheri
Copy link

top,left = (xmin,ymin)
bottom,right = (xmax,ymax) = (xmin+width, ymin+heightt)

@imneonizer
Copy link

in practical i have used this

x1,y1,x2,y2 = int(bbox['xmin']), int(bbox['ymax']), int(bbox['xmax']), int(bbox['ymin'])
cv2.rectangle(image, (x1,y1), (x2,y2), (0,255,0), 2)

hope it could help you.

@MohamedAboushnief
Copy link

is there any code to convert tracklet_labels.xml file into text files?
I have downloaded data from http://www.cvlibs.net/datasets/kitti/raw_data.php and want to convert labels to files same as labels from http://www.cvlibs.net/datasets/kitti/eval_object.php?obj_benchmark=3d

Did you find a solution?

@MohamedAboushnief
Copy link

I need help please. I have point cloud files (.bin) and want to label them so that it can look like the labels of kitti 3D object detection set in which are (.txt) files and have this structure Car 0.00 0 -1.58 587.01 173.33 614.12 200.12 1.65 1.67 3.64 -0.65 1.71 46.70 -1.59

can somebody help please?

@yuxguo
Copy link

yuxguo commented Apr 25, 2020

is there any code to convert tracklet_labels.xml file into text files?
I have downloaded data from http://www.cvlibs.net/datasets/kitti/raw_data.php and want to convert labels to files same as labels from http://www.cvlibs.net/datasets/kitti/eval_object.php?obj_benchmark=3d

Did you find a solution?

Hey, In my solution, based on kitti_raw_devtools/matlab/run_demoTracklets.m, I write a new .m file to convert tracklets.xml to 3d object detection labels format, but the \alpha field is not in tracklets.xml. The difference between \alpha and r_y is https://github.com/pratikac/kitti/blob/master/readme.tracking.txt#L89, and I am working on it.

@hoangduyloc
Copy link

is there any code to convert tracklet_labels.xml file into text files?
I have downloaded data from http://www.cvlibs.net/datasets/kitti/raw_data.php and want to convert labels to files same as labels from http://www.cvlibs.net/datasets/kitti/eval_object.php?obj_benchmark=3d

Hey, It's quite late. But you can extend your data by converting the Official KITTI Tracking Datasets to 3D object detection types

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests