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
48d0f138
Commit
48d0f138
authored
Jan 31, 2019
by
Rodrigo Berriel
Committed by
Francisco Massa
Jan 31, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove images in which all bboxes have width or height <= 1 (#396)
parent
c5ca36fc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
coco.py
maskrcnn_benchmark/data/datasets/coco.py
+15
-0
No files found.
maskrcnn_benchmark/data/datasets/coco.py
View file @
48d0f138
...
@@ -22,6 +22,21 @@ class COCODataset(torchvision.datasets.coco.CocoDetection):
...
@@ -22,6 +22,21 @@ class COCODataset(torchvision.datasets.coco.CocoDetection):
if
len
(
self
.
coco
.
getAnnIds
(
imgIds
=
img_id
,
iscrowd
=
None
))
>
0
if
len
(
self
.
coco
.
getAnnIds
(
imgIds
=
img_id
,
iscrowd
=
None
))
>
0
]
]
ids_to_remove
=
[]
for
img_id
in
self
.
ids
:
ann_ids
=
self
.
coco
.
getAnnIds
(
imgIds
=
img_id
)
anno
=
self
.
coco
.
loadAnns
(
ann_ids
)
if
all
(
any
(
o
<=
1
for
o
in
obj
[
"bbox"
][
2
:])
for
obj
in
anno
if
obj
[
"iscrowd"
]
==
0
):
ids_to_remove
.
append
(
img_id
)
self
.
ids
=
[
img_id
for
img_id
in
self
.
ids
if
img_id
not
in
ids_to_remove
]
self
.
json_category_id_to_contiguous_id
=
{
self
.
json_category_id_to_contiguous_id
=
{
v
:
i
+
1
for
i
,
v
in
enumerate
(
self
.
coco
.
getCatIds
())
v
:
i
+
1
for
i
,
v
in
enumerate
(
self
.
coco
.
getCatIds
())
}
}
...
...
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