Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
seminar-breakout
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Shashank Suhas
seminar-breakout
Commits
bbe7a12b
Commit
bbe7a12b
authored
May 12, 2017
by
Yuxin Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove FixedCrop
parent
66d5ce80
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
19 deletions
+1
-19
tensorpack/dataflow/imgaug/crop.py
tensorpack/dataflow/imgaug/crop.py
+1
-19
No files found.
tensorpack/dataflow/imgaug/crop.py
View file @
bbe7a12b
...
@@ -9,7 +9,7 @@ from ...utils.argtools import shape2d
...
@@ -9,7 +9,7 @@ from ...utils.argtools import shape2d
from
six.moves
import
range
from
six.moves
import
range
import
numpy
as
np
import
numpy
as
np
__all__
=
[
'RandomCrop'
,
'CenterCrop'
,
'FixedCrop'
,
__all__
=
[
'RandomCrop'
,
'CenterCrop'
,
'perturb_BB'
,
'RandomCropAroundBox'
,
'RandomCropRandomShape'
]
'perturb_BB'
,
'RandomCropAroundBox'
,
'RandomCropRandomShape'
]
...
@@ -64,24 +64,6 @@ class CenterCrop(ImageAugmentor):
...
@@ -64,24 +64,6 @@ class CenterCrop(ImageAugmentor):
raise
NotImplementedError
()
raise
NotImplementedError
()
class
FixedCrop
(
ImageAugmentor
):
""" Crop a rectangle at a given location"""
def
__init__
(
self
,
rect
):
"""
Args:
rect(Rect): min included, max excluded.
"""
self
.
_init
(
locals
())
def
_augment
(
self
,
img
,
_
):
return
img
[
self
.
rect
.
y0
:
self
.
rect
.
y1
+
1
,
self
.
rect
.
x0
:
self
.
rect
.
x1
+
1
]
def
_fprop_coord
(
self
,
coord
,
param
):
raise
NotImplementedError
()
def
perturb_BB
(
image_shape
,
bb
,
max_perturb_pixel
,
def
perturb_BB
(
image_shape
,
bb
,
max_perturb_pixel
,
rng
=
None
,
max_aspect_ratio_diff
=
0.3
,
rng
=
None
,
max_aspect_ratio_diff
=
0.3
,
max_try
=
100
):
max_try
=
100
):
...
...
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