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
vision
Commits
e21e4362
Unverified
Commit
e21e4362
authored
Feb 13, 2023
by
Philip Meier
Committed by
GitHub
Feb 13, 2023
Browse files
unbatch image_id in CocoDetection wrapper (#7232)
parent
a63046ce
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
torchvision/prototype/datapoints/_dataset_wrapper.py
torchvision/prototype/datapoints/_dataset_wrapper.py
+4
-0
No files found.
torchvision/prototype/datapoints/_dataset_wrapper.py
View file @
e21e4362
...
...
@@ -206,6 +206,10 @@ def coco_dectection_wrapper_factory(dataset):
batched_target
=
list_of_dicts_to_dict_of_lists
(
target
)
image_ids
=
batched_target
.
pop
(
"image_id"
)
image_id
=
batched_target
[
"image_id"
]
=
image_ids
.
pop
()
assert
all
(
other_image_id
==
image_id
for
other_image_id
in
image_ids
)
spatial_size
=
tuple
(
F
.
get_spatial_size
(
image
))
batched_target
[
"boxes"
]
=
datapoints
.
BoundingBox
(
batched_target
[
"bbox"
],
...
...
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