-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathmobilenet_ssd_priors.py
41 lines (34 loc) · 1.04 KB
/
mobilenet_ssd_priors.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
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
Created on Wed Jun 5 14:58:39 2019
@author: viswanatha
"""
import numpy as np
from box_utils import SSDSpec, SSDBoxSizes, generate_ssd_priors
image_size = 300
image_mean = np.array([127, 127, 127]) # RGB layout
image_std = 128.0
iou_threshold = 0.45
center_variance = 0.1
size_variance = 0.2
specs = [
SSDSpec(19, 16, SSDBoxSizes(60, 105), [2]),
SSDSpec(10, 32, SSDBoxSizes(105, 150), [2, 3]),
SSDSpec(5, 64, SSDBoxSizes(150, 195), [2, 3]),
SSDSpec(3, 100, SSDBoxSizes(195, 240), [2, 3]),
SSDSpec(2, 150, SSDBoxSizes(240, 285), [2]),
SSDSpec(1, 300, SSDBoxSizes(285, 330), [2]),
]
"""
specs = [
SSDSpec(19, 16, SSDBoxSizes(60, 105), [2, 3]),
SSDSpec(10, 32, SSDBoxSizes(105, 150), [2, 3]),
SSDSpec(5, 64, SSDBoxSizes(150, 195), [2, 3]),
SSDSpec(3, 100, SSDBoxSizes(195, 240), [2, 3]),
SSDSpec(2, 150, SSDBoxSizes(240, 285), [2, 3]),
SSDSpec(1, 300, SSDBoxSizes(285, 330), [2, 3])
]
"""
priors = generate_ssd_priors(specs, image_size)
# print (priors.shape)