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
e37323d9
Commit
e37323d9
authored
Nov 10, 2016
by
Soumith Chintala
Committed by
GitHub
Nov 10, 2016
Browse files
Merge pull request #1 from fmassa/coco_tfix
Minor fix in COCO dataset
parents
9378febe
0332624e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
torchvision/datasets/coco.py
torchvision/datasets/coco.py
+3
-0
No files found.
torchvision/datasets/coco.py
View file @
e37323d9
...
@@ -51,6 +51,9 @@ class CocoDetection(data.Dataset):
...
@@ -51,6 +51,9 @@ class CocoDetection(data.Dataset):
path
=
coco
.
loadImgs
(
img_id
)[
0
][
'file_name'
]
path
=
coco
.
loadImgs
(
img_id
)[
0
][
'file_name'
]
img
=
Image
.
open
(
os
.
path
.
join
(
self
.
root
,
path
)).
convert
(
'RGB'
)
img
=
Image
.
open
(
os
.
path
.
join
(
self
.
root
,
path
)).
convert
(
'RGB'
)
if
self
.
transform
is
not
None
:
img
=
self
.
transform
(
img
)
if
self
.
target_transform
is
not
None
:
if
self
.
target_transform
is
not
None
:
target
=
self
.
target_transform
(
target
)
target
=
self
.
target_transform
(
target
)
...
...
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