-
Notifications
You must be signed in to change notification settings - Fork 7
/
Augmentation.py
54 lines (41 loc) · 1.68 KB
/
Augmentation.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
############################################################################################
#
# Project: Peter Moss Acute Myeloid & Lymphoblastic Leukemia AI Research Project
# Repository: ALL Detection System 2019
# Project: Data Augmentation
#
# Author: Adam Milton-Barker (AdamMiltonBarker.com)
# Contributors:
# Title: Manual Data Augmentation Class
# Description: Manual data augmentation class for the ALL Detection System 2019.
# License: MIT License
# Last Modified: 2020-07-14
#
############################################################################################
import matplotlib.pyplot as plt
from Classes.Data import Data
plt.rcParams['figure.figsize'] = (5.0, 4.0)
plt.rcParams['image.interpolation'] = 'nearest'
plt.rcParams['image.cmap'] = 'gray'
class Augmentation():
""" ALL Detection System 2019 Manual Data Augmentation Class
Manual data augmentation wrapper class for the ALL Detection System 2019 Data Augmentation project.
"""
def __init__(self):
""" Initializes the Augmentation class. """
self.Data = Data()
def processDataset(self):
""" Processes the AML/ALL Detection System Dataset.
Make sure you have your equal amounts of positive and negative
samples in the Model/Data directories.
Only run this function once! it will continually make copies
of all images in the Settings->TrainDir directory specified
in Required/confs.json
"""
self.Data.processDataset()
print("!! Data Augmentation Program Starting !!")
print("")
Augmentation = Augmentation()
Augmentation.processDataset()
print(" Data Augmentation Program Complete")
print("")