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

Create Data #6

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

Conversation

StephenEkaputra
Copy link

Hi Gunjan, Thanks for your update. I just try using your code argoverse dataset.

  1. I wonder how to create data train.trch by create_data.py?

  2. I change the proto data path

  3. I change the preprocess.py part to this one:
    if info["include_roi"]:
    roi_pts_flag = am.remove_non_roi_points(roi_pts, city_name) # remove non-driveable region
    roi_pts_flag = np.array(roi_pts_flag, dtype=int)
    roi_pts = np.array(roi_pts, dtype=int)
    roi_pts = roi_pts[roi_pts_flag]

  4. When I run pytorch train. I got this error:

Traceback (most recent call last):
File "pytorch/train.py", line 697, in
fire.Fire()
File "/home/joinet/anaconda3/lib/python3.7/site-packages/fire/core.py", line 138, in Fire
component_trace = _Fire(component, args, parsed_flag_args, context, name)
File "/home/joinet/anaconda3/lib/python3.7/site-packages/fire/core.py", line 468, in _Fire
target=component.name)
File "/home/joinet/anaconda3/lib/python3.7/site-packages/fire/core.py", line 672, in _CallAndUpdateTrace
component = fn(*varargs, **kwargs)
File "pytorch/train.py", line 443, in train
raise e
File "pytorch/train.py", line 265, in train
example = next(data_iter)
File "/home/joinet/anaconda3/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 345, in next
data = self._next_data()
File "/home/joinet/anaconda3/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 856, in _next_data
return self._process_data(data)
File "/home/joinet/anaconda3/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 881, in _process_data
data.reraise()
File "/home/joinet/anaconda3/lib/python3.7/site-packages/torch/_utils.py", line 394, in reraise
raise self.exc_type(msg)
ValueError: Caught ValueError in DataLoader worker process 0.
Original Traceback (most recent call last):
File "/home/joinet/anaconda3/lib/python3.7/site-packages/torch/utils/data/_utils/worker.py", line 178, in _worker_loop
data = fetcher.fetch(index)
File "/home/joinet/anaconda3/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 44, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/home/joinet/anaconda3/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 44, in
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/home/joinet/Semester_2/School/final/pointpillar_argoverse/second/pytorch/builder/input_reader_builder.py", line 42, in getitem
return self._dataset[idx]
File "/home/joinet/Semester_2/School/final/pointpillar_argoverse/second/data/dataset.py", line 162, in getitem
prep_func=self._prep_func)
File "/home/joinet/Semester_2/School/final/pointpillar_argoverse/second/data/preprocess.py", line 299, in _read_and_prep_v9
roi_pts = am.remove_ground_surface(roi_pts, city_name) # remove ground surface
File "/home/joinet/Semester_2/School/final/argoverse-api/argoverse/map_representation/map_api.py", line 303, in remove_ground_surface
is_ground_boolean_arr = self.get_ground_points_boolean(point_cloud, city_name)
File "/home/joinet/Semester_2/School/final/argoverse-api/argoverse/map_representation/map_api.py", line 354, in get_ground_points_boolean
ground_height_values = self.get_ground_height_at_xy(point_cloud, city_name)
File "/home/joinet/Semester_2/School/final/argoverse-api/argoverse/map_representation/map_api.py", line 378, in get_ground_height_at_xy
npyimage_coords = npyimage_to_city_se2.transform_point_cloud(city_coords)
File "/home/joinet/Semester_2/School/final/argoverse-api/argoverse/utils/se2.py", line 43, in transform_point_cloud
homogeneous_pts = np.hstack([point_cloud, np.ones((num_points, 1))])
File "<array_function internals>", line 6, in hstack
File "/home/joinet/anaconda3/lib/python3.7/site-packages/numpy/core/shape_base.py", line 345, in hstack
return _nx.concatenate(arrs, 1)
File "<array_function internals>", line 6, in concatenate
ValueError: all the input arrays must have same number of dimensions, but the array at index 0 has 3 dimension(s) and the array at index 1 has 2 dimension(s)

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

Successfully merging this pull request may close these issues.

2 participants