def __init__(self):
        self.image_size = 300
        self.image_mean = np.array([127, 127, 127])  # RGB layout
        self.image_std = 128.0
        self.iou_threshold = 0.45
        self.center_variance = 0.1
        self.size_variance = 0.2

        self.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]),
        ]

        self.priors = generate_ssd_priors(self.specs, self.image_size)
    def __init__(self):
        self.image_size = 300
        self.image_mean = np.array([123, 117, 104])  # RGB layout
        self.image_std = 1.0

        self.iou_threshold = 0.45
        self.center_variance = 0.1
        self.size_variance = 0.2

        self.specs = [
            SSDSpec(38, 8, SSDBoxSizes(30, 60), [2]),
            SSDSpec(19, 16, SSDBoxSizes(60, 111), [2, 3]),
            SSDSpec(10, 32, SSDBoxSizes(111, 162), [2, 3]),
            SSDSpec(5, 64, SSDBoxSizes(162, 213), [2, 3]),
            SSDSpec(3, 100, SSDBoxSizes(213, 264), [2]),
            SSDSpec(1, 300, SSDBoxSizes(264, 315), [2])
        ]

        self.priors = generate_ssd_priors(self.specs, self.image_size)
import numpy as np

from vision.utils.box_utils import SSDSpec, SSDBoxSizes, generate_ssd_priors


image_size = 300
image_mean = np.array([123, 117, 104])  # RGB layout
image_std = 1.0

iou_threshold = 0.45
center_variance = 0.1
size_variance = 0.2

specs = [
    SSDSpec(38, 8, SSDBoxSizes(30, 60), [2]),
    SSDSpec(19, 16, SSDBoxSizes(60, 111), [2, 3]),
    SSDSpec(10, 32, SSDBoxSizes(111, 162), [2, 3]),
    SSDSpec(5, 64, SSDBoxSizes(162, 213), [2, 3]),
    SSDSpec(3, 100, SSDBoxSizes(213, 264), [2]),
    SSDSpec(1, 300, SSDBoxSizes(264, 315), [2])
]


#priors = generate_ssd_priors(specs, image_size)
import numpy as np

from vision.utils.box_utils import SSDSpec, SSDBoxSizes, generate_ssd_priors

image_size = 512
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, 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])
# ]

specs = [
    SSDSpec(32, 16, SSDBoxSizes(60, 105), [2, 3]),
    SSDSpec(16, 32, SSDBoxSizes(105, 150), [2, 3]),
    SSDSpec(8, 64, SSDBoxSizes(150, 195), [2, 3]),
    SSDSpec(4, 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)
import numpy as np

from vision.utils.box_utils import SSDSpec, SSDBoxSizes, generate_ssd_priors

image_size = 320
# image_mean = np.array([127, 127, 127])  # RGB layout
image_mean = np.array([123, 117, 104])  # RGB layout
# image_std = 128.0
# iou_threshold = 0.5
center_variance = 0.1
size_variance = 0.2
specs = [
    SSDSpec(20, 16, SSDBoxSizes(60, 105), [2, 3]),
    SSDSpec(10, 32, SSDBoxSizes(105, 150), [2, 3]),
    SSDSpec(5, 64, SSDBoxSizes(150, 195), [2, 3]),
    SSDSpec(3, 107, SSDBoxSizes(195, 240), [2, 3]),
    SSDSpec(2, 160, SSDBoxSizes(240, 285), [2, 3]),
    SSDSpec(1, 320, SSDBoxSizes(285, 330), [2, 3])
]

##vgg300
iou_threshold = 0.45
image_std = 1.0

# specs = [
#     SSDSpec(38, 8, SSDBoxSizes(30, 60), [2]),
#     SSDSpec(19, 16, SSDBoxSizes(60, 111), [2, 3]),
#     SSDSpec(10, 32, SSDBoxSizes(111, 162), [2, 3]),
#     SSDSpec(5, 64, SSDBoxSizes(162, 213), [2, 3]),
#     SSDSpec(3, 100, SSDBoxSizes(213, 264), [2]),
#     SSDSpec(1, 300, SSDBoxSizes(264, 315), [2])
import numpy as np

from vision.utils.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(15, 30), [2, 3]),
    SSDSpec(10, 32, SSDBoxSizes(30, 60), [2, 3]),
    SSDSpec(5, 64, SSDBoxSizes(60, 105), [2, 3]),
    SSDSpec(3, 100, SSDBoxSizes(105, 150), [2, 3]),
    SSDSpec(2, 150, SSDBoxSizes(150, 195), [2, 3]),
    SSDSpec(1, 300, SSDBoxSizes(195, 240), [2, 3])
]

#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)
Exemple #7
0
import numpy as np

from vision.utils.box_utils import SSDSpec, SSDBoxSizes, generate_ssd_priors

image_size = 512
image_mean = np.array([123, 117, 104])  # RGB layout
image_std = 1.0

iou_threshold = 0.45
center_variance = 0.1
size_variance = 0.2

specs = [
    SSDSpec(64, 8, SSDBoxSizes(30, 60), [2]),
    SSDSpec(32, 16, SSDBoxSizes(60, 111), [2, 3]),
    SSDSpec(16, 32, SSDBoxSizes(111, 162), [2, 3]),
    SSDSpec(8, 64, SSDBoxSizes(162, 213), [2, 3]),
    SSDSpec(6, 100, SSDBoxSizes(213, 264), [2]),
    SSDSpec(4, 150, SSDBoxSizes(264, 315), [2]),
    SSDSpec(2, 300, SSDBoxSizes(315, 350), [2])
]

priors = generate_ssd_priors(specs, image_size)
Exemple #8
0
import numpy as np

from vision.utils.box_utils import SSDSpec, SSDBoxSizes, generate_ssd_priors

image_size = [
    300, 300
]  # for the implementation for different image sizes (848 x 480) see file "box_utils_resizing.py"
image_mean = np.array([127, 127, 127])  # RGB layout
image_std = 128
iou_threshold = 0.45
center_variance = 0.1
size_variance = 0.2

specs = [
    SSDSpec([19, 19], 16, SSDBoxSizes(60, 105), [2, 3]),
    SSDSpec([10, 10], 32, SSDBoxSizes(105, 150), [2, 3]),
    SSDSpec([5, 5], 64, SSDBoxSizes(150, 195), [2, 3]),
    SSDSpec([3, 3], 100, SSDBoxSizes(195, 240), [2, 3]),
    SSDSpec([2, 2], 150, SSDBoxSizes(240, 285), [2, 3]),
    SSDSpec([1, 1], 300, SSDBoxSizes(285, 330), [2, 3])
]

priors = generate_ssd_priors(specs, image_size)
Exemple #9
0
import numpy as np

from vision.utils.box_utils import SSDSpec, SSDBoxSizes, generate_ssd_priors

image_size = 300
image_mean = np.array([127, 127, 127])  # RGB layout
image_std = 128.0  #np.array([255, 255, 255]) #np.array([78.77, 80.508, 86.448])
iou_threshold = 0.3
center_variance = 0.1
size_variance = 0.2

specs = [
    SSDSpec(38, 8, SSDBoxSizes(8, 25), [2]),
    SSDSpec(19, 16, SSDBoxSizes(25, 57), [2, 3]),
    SSDSpec(19, 16, SSDBoxSizes(57, 111), [2, 3]),
    SSDSpec(10, 32, SSDBoxSizes(111, 162), [2, 3]),
    SSDSpec(5, 64, SSDBoxSizes(162, 213), [2, 3]),
    SSDSpec(3, 100, SSDBoxSizes(213, 240), [2, 3]),
    SSDSpec(2, 150, SSDBoxSizes(240, 285), [2, 3])
]

priors = generate_ssd_priors(specs, image_size)
Exemple #10
0
import numpy as np

from vision.utils.box_utils import SSDSpec, SSDBoxSizes, generate_ssd_priors

image_size = 512
image_mean = np.array([85, 90, 81])  # RGB layout(85, 90, 81)#[119,120,112]
image_std = 1.0

iou_threshold = 0.45
center_variance = 0.1
size_variance = 0.2
#10
specs = [
    SSDSpec(64, 8, SSDBoxSizes(40, 80), [2]),
    SSDSpec(32, 16, SSDBoxSizes(80, 120), [2, 3]),
    SSDSpec(16, 32, SSDBoxSizes(120, 160), [2, 3]),
    SSDSpec(8, 64, SSDBoxSizes(160, 200), [2, 3]),
    SSDSpec(6, 124, SSDBoxSizes(240, 280), [2]),
    SSDSpec(4, 256, SSDBoxSizes(280, 320), [2])
]
# specs = [
#     SSDSpec(64, 8, SSDBoxSizes(30, 60), [2]),
#     SSDSpec(32, 16, SSDBoxSizes(60, 90), [2, 3]),
#     SSDSpec(16, 32, SSDBoxSizes(90, 130), [2, 3]),
#     SSDSpec(8, 64, SSDBoxSizes(130, 180), [2, 3]),
#     SSDSpec(6, 124, SSDBoxSizes(180, 240), [2]),
#     SSDSpec(4, 256, SSDBoxSizes(240, 300), [2])
# ]
priors = generate_ssd_priors(specs, image_size)
# ]

# specs = [
#     SSDSpec(48, 16, SSDBoxSizes(32, 64), [2]),
#
#     SSDSpec(24, 32, SSDBoxSizes(64, 112), [2, 3]),
#     SSDSpec(12, 64, SSDBoxSizes(112, 180), [2, 3]),
#     SSDSpec(6, 128, SSDBoxSizes(180, 256), [2, 3]),
#     SSDSpec(3, 256, SSDBoxSizes(256, 512), [2, 3]),
#     SSDSpec(2, 384, SSDBoxSizes(512, 768), [2])
# ]
# specs = [
#     SSDSpec(48, 16, SSDBoxSizes(60, 120), [2]),
#
#     SSDSpec(24, 32, SSDBoxSizes(120, 240), [2, 3]),
#     SSDSpec(12, 64, SSDBoxSizes(240, 360), [2, 3]),
#     SSDSpec(6, 128, SSDBoxSizes(360, 480), [2, 3]),
#     SSDSpec(3, 256, SSDBoxSizes(480, 640), [2, 3]),
#     SSDSpec(2, 384, SSDBoxSizes(640, 800), [2])
# ]
specs = [
    SSDSpec(48, 16, SSDBoxSizes(40, 120), [2, 3, 0.6, 0.4]),
    SSDSpec(24, 32, SSDBoxSizes(120, 240), [2, 3, 0.6, 0.4]),
    SSDSpec(12, 64, SSDBoxSizes(240, 360), [2, 3, 0.6, 0.4]),
    SSDSpec(6, 128, SSDBoxSizes(360, 480), [2, 3, 0.6, 0.4]),
    SSDSpec(3, 256, SSDBoxSizes(480, 640), [2, 3, 0.6, 0.4]),
    SSDSpec(2, 384, SSDBoxSizes(640, 800), [2, 3, 0.6, 0.4])
]

priors = generate_ssd_priors(specs, image_size)
# print(priors)