Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
M
maskrcnn
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
人工智能
maskrcnn
Commits
1127bdd3
Commit
1127bdd3
authored
May 02, 2019
by
Qizhu Li
Committed by
Francisco Massa
May 02, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Renames the `transforms` attribute of COCODataset (#744)
Avoids naming clash with torchvision CocoDetection class
parent
eb4d3352
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
coco.py
maskrcnn_benchmark/data/datasets/coco.py
+3
-3
No files found.
maskrcnn_benchmark/data/datasets/coco.py
View file @
1127bdd3
...
...
@@ -61,7 +61,7 @@ class COCODataset(torchvision.datasets.coco.CocoDetection):
v
:
k
for
k
,
v
in
self
.
json_category_id_to_contiguous_id
.
items
()
}
self
.
id_to_img_map
=
{
k
:
v
for
k
,
v
in
enumerate
(
self
.
ids
)}
self
.
transforms
=
transforms
self
.
_
transforms
=
transforms
def
__getitem__
(
self
,
idx
):
img
,
anno
=
super
(
COCODataset
,
self
)
.
__getitem__
(
idx
)
...
...
@@ -90,8 +90,8 @@ class COCODataset(torchvision.datasets.coco.CocoDetection):
target
=
target
.
clip_to_image
(
remove_empty
=
True
)
if
self
.
transforms
is
not
None
:
img
,
target
=
self
.
transforms
(
img
,
target
)
if
self
.
_
transforms
is
not
None
:
img
,
target
=
self
.
_
transforms
(
img
,
target
)
return
img
,
target
,
idx
...
...
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