Skip to content
This repository has been archived by the owner on Jul 2, 2021. It is now read-only.

Add kitti dataset #697

Open
wants to merge 57 commits into
base: master
Choose a base branch
from
Open

Conversation

Sirokujira
Copy link

Issue #139

use package :
pykitti package(0.2.4/0.3.0)
parseTrackletXML.py
(Methods for parsing tracklets (e.g. dataset labels),
originally created by Christian Herdtweck.)

Function :
Display labels and boxes

not implemented
Grayscale processing

list() to []
syntax miss(iable -> label)
…_dataset

# Conflicts:
#	docs/source/reference/datasets.rst
rename filename(add _bbox_)
rename class(add Bbox)
testcode use bbox_assert
Fit Bbox to image area
bbox, label parameter replace from list to ndarray
modified TestCode(variant lowercase)
add gray image test
test code success testdata.(comment ng test)
@yuyu2172 yuyu2172 self-assigned this Sep 24, 2018
@yuyu2172
Copy link
Member

Hi! Thank you for your PR! Some comments.

  1. Could you change default data directory from KITTI to kitti? (similarly for COCO, we name the directory as coco)
  2. Could you raise more friendly error when date or drive_num are not specified? (label_resolution option of CityscapesSemanticSegmentationDataset is a good example for situation like this)
  3. Could you change the shape of label to (0,) when there is only one instance?
    https://github.com/chainer/chainercv/blob/master/chainercv/utils/testing/assertions/assert_is_bbox_dataset.py#L51
  4. Is it possible to drop support for gray scale image? If we drop support, can we use pykitti==0.3.0 for all settings? I personally prefer to set 0.3.0 as the recommended pykitti version.

@yuyu2172
Copy link
Member

Do you know any experiments in academic papers that can be supported by this dataset?

@Sirokujira
Copy link
Author

  1. current data folder name Lower case(and download destination folder)

  2. add check logic (check date, drivenum)

  3. fixed code(label shape 2 dim -> 1 dim)

  4. fixed use pykitti >= 0.3.0 (dropped function grayscale image process.)

Do you know any experiments in academic papers that can be supported by this dataset?

source of a quote?
It is the item "raw dataset" of "Citation" at http://www.cvlibs.net/datasets/kitti/.
(add comment kitti_bbox_dataset.py)

I do not know about the research citing the data set.

)
kitti_ignore_bbox_label_color = (0, 0, 0)

kitti_date_lists = ['2011_09_26', '2011_09_28',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you rename this to kitti_date_list or kitti_dates?

kitti_date_lists = ['2011_09_26', '2011_09_28',
'2011_09_29', '2011_09_30', '2011_10_03']

kitti_date_num_dicts = {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you rename this to kitti_date_num_dict?

KITTI
-----

KITTIDataset
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

KITTIBboxDataset


KITTIDataset
~~~~~~~~~~~~
.. autoclass:: KITTIDataset
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

dataArray = []
for cam2 in self.dataset.cam2:
data = np.asarray(cam2)
# Convert RGB to BGR
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this comment be the opposite?

dataArray = []
for cam2 in self.dataset.cam2:
data = np.asarray(cam2)
# Convert RGB to BGR
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

":math:`(y_{min}, x_{min}, y_{max}, x_{max})`"
:obj:`label`, scalar, :obj:`int32`, ":math:`[0, \#class - 1]`"

.. [#kitti_bbox_1] If :obj:`tracklet = True`, \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this comment true?


When queried by an index, if :obj:`tracklet == True`,
this dataset returns a corresponding
:obj:`img, bbox, label`, a tuple of an image, bounding boxes, labels.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you make two classes: KITTIBboxDataset and KITTIImageDataset?
It is confusing that when tracklet=False, the dataset never returns unempty bounding box or label even though it is named as BboxDataset.
KITTIBboxDataset should only support 2011_09_26, and KITTIImageDataset should support all the other dates.
Also, if you don't want to, you do not need to implement KITTIImageDataset.

We have two classes for Cityscapes as well because subset of the dataset does not contain annotation.

from chainercv.datasets.kitti.kitti_bbox_dataset import KITTIBboxDataset # NOQA
from chainercv.datasets.kitti.kitti_utils import kitti_bbox_label_colors # NOQA
from chainercv.datasets.kitti.kitti_utils import kitti_bbox_label_names # NOQA
from chainercv.datasets.kitti.kitti_utils import kitti_date_lists # NOQA
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to expose this object at this namespace?
We only expose _label_names and _colors here.

from chainercv.datasets.kitti.kitti_utils import kitti_bbox_label_colors # NOQA
from chainercv.datasets.kitti.kitti_utils import kitti_bbox_label_names # NOQA
from chainercv.datasets.kitti.kitti_utils import kitti_date_lists # NOQA
from chainercv.datasets.kitti.kitti_utils import kitti_date_num_dicts # NOQA
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

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

Successfully merging this pull request may close these issues.

2 participants