Update readme.md and script for image generating

This commit is contained in:
nlitkowski 2019-05-05 16:42:19 +02:00
parent 104087c660
commit 68e49591f7
2 changed files with 18 additions and 13 deletions

View File

@ -1,16 +1,21 @@
import Augmentor
def main():
import Augmentor
p = [Augmentor.Pipeline("Images/TrainingImages/glass"),
Augmentor.Pipeline("Images/TrainingImages/metal"),
Augmentor.Pipeline("Images/TrainingImages/paper"),
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)
p = [Augmentor.Pipeline("Images/TrainingImages/glass"),
Augmentor.Pipeline("Images/TrainingImages/metal"),
Augmentor.Pipeline("Images/TrainingImages/paper"),
Augmentor.Pipeline("Images/TrainingImages/plastic")]
# Setting zoom values
p[i].zoom(probability=0.5, min_factor=1.1, max_factor=1.5)
# Size of training sample
p[i].sample(1000)
p[i].process()
for i in range(len(p)):
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].sample(1000)
p[i].process()
if __name__ == "__main__":
main()

View File

@ -11,7 +11,7 @@
- [NumPy](http://www.numpy.org/)
- [PyQt5](https://pypi.org/project/PyQt5/)
- [TensorFlow](https://www.tensorflow.org/)
- [Augmentor](https://github.com/mdbloice/Augmentor)
- [Augmentor](https://augmentor.readthedocs.io)
**Credits**
- As a learning set of images I used images from [this](https://github.com/garythung/trashnet) project.