Closed jhonykaesemodel closed 3 years ago
I believe some tests are failing in CI:
=================================== FAILURES ===================================
__________________________ test_image_timestamp_list ___________________________
data_loader = <argoverse.data_loading.argoverse_stereo_loader.ArgoverseStereoLoader object at 0x7fb572254780>
def test_image_timestamp_list(data_loader: ArgoverseStereoLoader) -> None:
assert set(data_loader.image_timestamp_list.keys()) == set(STEREO_CAMERA_LIST)
for camera in STEREO_CAMERA_LIST[3:]:
> assert 1 in data_loader.image_timestamp_list[camera]
E assert 1 in []
tests/test_argoverse_stereo_loader.py:38: AssertionError
__________________________ test_timestamp_image_dict ___________________________
data_loader = <argoverse.data_loading.argoverse_stereo_loader.ArgoverseStereoLoader object at 0x7fb572278748>
def test_timestamp_image_dict(data_loader: ArgoverseStereoLoader) -> None:
assert set(data_loader.timestamp_image_dict.keys()) == set(STEREO_CAMERA_LIST)
for camera in STEREO_CAMERA_LIST[3:]:
> assert len(data_loader.timestamp_image_dict[camera]) == 1
E assert 0 == 1
E + where 0 = len({})
tests/test_argoverse_stereo_loader.py:44: AssertionError
_________________________ test_loading_image_disparity _________________________
data_loader = <argoverse.data_loading.argoverse_stereo_loader.ArgoverseStereoLoader object at 0x7fb571d06f98>
def test_loading_image_disparity(data_loader: ArgoverseStereoLoader) -> None:
camera = STEREO_CAMERA_LIST[2]
disparity = STEREO_DISPARITY_LIST[0]
disparity_objects = STEREO_DISPARITY_LIST[1]
log = "1"
image_1_at_timestamp = data_loader.get_image_at_timestamp(1, camera, log)
> image_1 = data_loader.get_image(0, camera, log)
tests/test_argoverse_stereo_loader.py:65:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <argoverse.data_loading.argoverse_stereo_loader.ArgoverseStereoLoader object at 0x7fb571d06f98>
idx = 0, camera = 'stereo_front_left_rect', log_id = '1', load = True
def get_image(
self, idx: int, camera: str, log_id: Optional[str] = None, load: bool = True
) -> Union[str, np.ndarray]:
"""get image or image path at a specific index (in image index)
Args:
idx: image based 0-index
camera: camera based on camera_stats.STEREO_CAMERA_LIST
log_id: log_id, if not specified will use self.current_log
load: whether to return image array (True) or image path (False)
Returns:
np.array: list of image path (str or np.array)),
"""
assert self.image_timestamp_list is not None
assert self._image_timestamp_list is not None
assert self.image_list is not None
assert self._image_list is not None
if log_id is None:
log_id = self.current_log
> assert idx < len(self._image_timestamp_list[log_id][camera])
E AssertionError
argoverse/data_loading/argoverse_stereo_loader.py:363: AssertionError
@benjaminrwilson maybe you can take a look too?
Thanks a lot so far, @johnwlambert. Awesome comments! I'll address them asap, and sorry for this huge PR.
Additionally, what you do you think about making a top-level csrc
directory for c++ and cuda extensions? (e.g., https://github.com/rusty1s/pytorch_cluster/tree/master/csrc)
Hi Jhony, you will probably need to pull master into your branch, to get Ben's CI fixes
2 small typos in the notebook here
My bad, is must be
if self._calib is not None:
... It passed all tests somehow. Do you think we should use thepass
since the function returns nothing? I think the older format is cleaner.
Would a simple return
instead of pass
accomplish the logic?
Add supporting code for the stereo competition. New stereo data loader, stereo evaluation, Jupyter notebook for tutorial, etc.