-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ae85d51
commit 7617dd0
Showing
6 changed files
with
50 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,4 @@ | ||
#!/usr/bin/env python | ||
|
||
import rudi | ||
|
||
if __name__ == "__main__": | ||
rudi.cli() | ||
rudi.cli() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
from .converter import * | ||
from .converter import * | ||
from .augmentor import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import Augmentor | ||
|
||
def augment_(args): | ||
|
||
p = Augmentor.Pipeline(args["root_dir"]) | ||
|
||
#Default params | ||
probability_ = args["probability"] | ||
magnitude_ = args["magnitude"] | ||
left_r_ = args["left_r"] | ||
right_r = args["right_r"] | ||
grid_ = args["grid"] | ||
minf_ = args["min_factor"] | ||
maxf_ = args["max_factor"] | ||
num_ = args["num"] | ||
|
||
# Operations | ||
flip_ = args["flip"] | ||
rotate_ = args["rotate"] | ||
distortion_ = args["distortion"] | ||
skew_ = args["skew"] | ||
zoom_ = args["zoom"] | ||
|
||
if rotate_: | ||
p.rotate(probability=probability_, max_left_rotation=left_r_, max_right_rotation=right_r) | ||
if distortion_: | ||
p.random_distortion(probability=probability_, grid_width=grid_, grid_height=grid_, magnitude=magnitude_) | ||
if skew_: | ||
p.skew(probability=probability_, magnitude=0.7) | ||
if zoom_: | ||
p.zoom(probability=probability_, min_factor=minf_, max_factor=maxf_) | ||
if flip_: | ||
p.flip_random(probability=probability_) | ||
|
||
p.sample(num_) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters