-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfajn-tjun.py
62 lines (37 loc) · 1.18 KB
/
fajn-tjun.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
55
56
57
58
59
60
61
62
from yolo import Yolo
import json
if __name__ == "__main__":
CONFIG_FILE = 'config.json'
with open(CONFIG_FILE) as f:
config = json.load(f)
yolo = Yolo(config)
yolo.start_training()
# Initiate the train and test generators with data Augumentation
# train_datagen = ImageDataGenerator(
# rescale=1. / 255,
# horizontal_flip=True,
# fill_mode="nearest",
# zoom_range=0.3,
# width_shift_range=0.3,
# height_shift_range=0.3,
# rotation_range=30)
#
# test_datagen = ImageDataGenerator(
# rescale=1. / 255,
# horizontal_flip=True,
# fill_mode="nearest",
# zoom_range=0.3,
# width_shift_range=0.3,
# height_shift_range=0.3,
# rotation_range=30)
#
# train_generator = train_datagen.flow_from_directory(
# train_data_dir,
# target_size=(IMAGE_HEIGHT, IMAGE_WIDTH),
# batch_size=batch_size,
# class_mode="categorical")
#
# validation_generator = test_datagen.flow_from_directory(
# validation_data_dir,
# target_size=(IMAGE_HEIGHT, IMAGE_WIDTH),
# class_mode="categorical")