Skip to content

Instantly share code, notes, and snippets.

@bandiatindra
Created December 14, 2018 19:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bandiatindra/047c28826d6731609386df6a991de5c8 to your computer and use it in GitHub Desktop.
Save bandiatindra/047c28826d6731609386df6a991de5c8 to your computer and use it in GitHub Desktop.
LABELS = ['Shirt', 'Trousers', 'Swimwear', 'Tie', 'Bus', 'Truck', 'Train', 'Motorcycle', 'Helmet', 'Shorts', 'Airplane',
'Sunglasses', 'Jacket', 'Dress', 'Human eye', 'Suit', 'Footwear', 'Woman', 'Human face', 'Man', 'Human arm',
'Human head','Human hand', 'Human leg', 'Human nose', 'Human mouth', 'Human ear', 'Human beard', 'Human foot', 'Car',
'Wheel', 'Boat', 'House', 'Bird', 'Guitar', 'Fast food', 'Hat', 'Dog', 'Laptop', 'Beer', 'Cat', 'Lantern', 'Fountain']
# Setting the input image size to 608 X 608
IMAGE_H, IMAGE_W = 608, 608
# We wil use 19X19 grids for our images. This will lead us to a total of 608/19 = 32 grids for an image
GRID_H, GRID_W = 19 , 19
BOX = 5
# Getting the total number of classes/labels we will be predicting.
CLASS = len(LABELS)
# Assigning 1's to all class labels
CLASS_WEIGHTS = np.ones(CLASS, dtype='float32')
# Pr (object in class) * Pr (class of the object) < Obj_threshold, then it disregards this anchor box
OBJ_THRESHOLD = 0.3#0.5
# If there are many overlapping boxes and IOU is > NMS_thereshold, then we will drop the one with a lower probability.
NMS_THRESHOLD = 0.3#0.45
# Anchor Boxes Dimensions
ANCHORS = [0.57273, 0.677385, 1.87446, 2.06253, 3.33843, 5.47434, 7.88282, 3.52778, 9.77052, 9.16828]
NO_OBJECT_SCALE = 1.0
OBJECT_SCALE = 5.0
COORD_SCALE = 1.0
CLASS_SCALE = 1.0
BATCH_SIZE = 16
WARM_UP_BATCHES = 0
TRUE_BOX_BUFFER = 50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment