-
Notifications
You must be signed in to change notification settings - Fork 32
/
bowl_config.py
46 lines (32 loc) · 1.34 KB
/
bowl_config.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
from config import Config
class BowlConfig(Config):
"""Configuration for training on the toy shapes dataset.
Derives from the base Config class and overrides values specific
to the toy shapes dataset.
"""
# Give the configuration a recognizable name
NAME = "bowl"
# Train on 1 GPU and 8 images per GPU. We can put multiple images on each
# GPU because the images are small. Batch size is 8 (GPUs * images/GPU).
GPU_COUNT = 1
IMAGES_PER_GPU = 2
# Number of classes (including background)
NUM_CLASSES = 1 + 1 # background + nuclei
# Use small images for faster training. Set the limits of the small side
# the large side, and that determines the image shape.
IMAGE_MIN_DIM = 512
IMAGE_MAX_DIM = 512
# Use smaller anchors because our image and objects are small
RPN_ANCHOR_SCALES = (8, 16, 32, 64, 128) # anchor side in pixels
# Reduce training ROIs per image because the images are small and have
# few objects. Aim to allow ROI sampling to pick 33% positive ROIs.
TRAIN_ROIS_PER_IMAGE = 600
STEPS_PER_EPOCH = None
# use small validation steps since the epoch is small
VALIDATION_STEPS = 5
USE_MINI_MASK = True
MAX_GT_INSTANCES = 256
DETECTION_MAX_INSTANCES = 512
RESNET_ARCHITECTURE = "resnet50"
bowl_config = BowlConfig()
bowl_config.display()