Add new operations
This commit is contained in:
parent
68e49591f7
commit
158c26ec01
@ -1,18 +1,20 @@
|
|||||||
def main():
|
def main():
|
||||||
import Augmentor
|
import Augmentor
|
||||||
|
|
||||||
p = [Augmentor.Pipeline("Images/TrainingImages/glass"),
|
p = [Augmentor.Pipeline("Images/TrainingImages/glass"),
|
||||||
Augmentor.Pipeline("Images/TrainingImages/metal"),
|
Augmentor.Pipeline("Images/TrainingImages/metal"),
|
||||||
Augmentor.Pipeline("Images/TrainingImages/paper"),
|
Augmentor.Pipeline("Images/TrainingImages/paper"),
|
||||||
Augmentor.Pipeline("Images/TrainingImages/plastic")]
|
Augmentor.Pipeline("Images/TrainingImages/plastic")]
|
||||||
for i in range(len(p)):
|
|
||||||
# Setting rotate values
|
|
||||||
p[i].rotate(probability=0.7, max_left_rotation=10, max_right_rotation=10)
|
|
||||||
|
|
||||||
# Setting zoom values
|
for i in range(len(p)):
|
||||||
|
# Setting the operations to perform on image set
|
||||||
|
p[i].rotate(probability=0.7, max_left_rotation=10, max_right_rotation=10)
|
||||||
p[i].zoom(probability=0.5, min_factor=1.1, max_factor=1.5)
|
p[i].zoom(probability=0.5, min_factor=1.1, max_factor=1.5)
|
||||||
|
p[i].flip_random(probability=0.6)
|
||||||
|
p[i].skew(probability=0.7, magnitude=0.7)
|
||||||
|
|
||||||
# Size of training sample
|
# Size of training sample
|
||||||
p[i].sample(1000)
|
p[i].sample(2000)
|
||||||
|
|
||||||
p[i].process()
|
p[i].process()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user