-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
49 lines (39 loc) · 1.26 KB
/
main.py
File metadata and controls
49 lines (39 loc) · 1.26 KB
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
from contextlib import nullcontext
import os
from pattern import Checker,Circle,Spectrum
from generator import ImageGenerator
def main():
resolution = 1000
checker_resolution=40 #40/2*tile_size
tile_size = 2
radius = 50
position = (512,256)
checker = Checker(checker_resolution, tile_size) # checker check
checker.draw()
checker.show()
circle= Circle(resolution,radius,position) # circle check
circle.draw()
circle.show()
spectrum=Spectrum(resolution) #circle check
spectrum.draw()
spectrum.show()
print(os.path.exists("D:\\exercise0_material\\exercise0_material\\src_to_implement\\exercise_data"))
file_path = "D:\\exercise0_material\\exercise0_material\\src_to_implement\\exercise_data"
label_path = r"D:\exercise0_material\exercise0_material\src_to_implement\labels.json"
batch_size= 15
image_size = (20, 20, 3)
rotation = False
mirroring = False
shuffle = True
Image_Generator= ImageGenerator( #image generator check
file_path=file_path,
label_path=label_path,
batch_size=batch_size,
image_size=image_size,
rotation=rotation,
mirroring=mirroring,
shuffle=shuffle
)
Image_Generator.next()
Image_Generator.show()
main()