Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
OpenPCDet
Commits
be0507ce
Unverified
Commit
be0507ce
authored
Jul 02, 2020
by
Shaoshuai Shi
Committed by
GitHub
Jul 02, 2020
Browse files
add comments for supporting costum dataset (#115)
* add comments for supporting costum dataset
parent
45840b51
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
1 deletion
+30
-1
pcdet/datasets/dataset.py
pcdet/datasets/dataset.py
+30
-1
No files found.
pcdet/datasets/dataset.py
View file @
be0507ce
...
@@ -47,10 +47,39 @@ class DatasetTemplate(torch_data.Dataset):
...
@@ -47,10 +47,39 @@ class DatasetTemplate(torch_data.Dataset):
def
__setstate__
(
self
,
d
):
def
__setstate__
(
self
,
d
):
self
.
__dict__
.
update
(
d
)
self
.
__dict__
.
update
(
d
)
@
staticmethod
def
generate_prediction_dicts
(
batch_dict
,
pred_dicts
,
class_names
,
output_path
=
None
):
"""
To support a custom dataset, implement this function to receive the predicted results from the model, and then
transform the unified normative coordinate to your required coordinate, and optionally save them to disk.
Args:
batch_dict: dict of original data from the dataloader
pred_dicts: dict of predicted results from the model
pred_boxes: (N, 7), Tensor
pred_scores: (N), Tensor
pred_labels: (N), Tensor
class_names:
output_path: if it is not None, save the results to this path
Returns:
"""
def
__len__
(
self
):
def
__len__
(
self
):
raise
NotImplementedError
raise
NotImplementedError
def
forward
(
self
,
index
):
def
__getitem__
(
self
,
index
):
"""
To support a custom dataset, implement this function to load the raw data (and labels), then transform them to
the unified normative coordinate and call the function self.prepare_data() to process the data and send them
to the model.
Args:
index:
Returns:
"""
raise
NotImplementedError
raise
NotImplementedError
def
prepare_data
(
self
,
data_dict
):
def
prepare_data
(
self
,
data_dict
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment