!12312 Add requirements and docker file in ssd, update the config of num_ssd_boxes

From: @c_34
Reviewed-by: @oacjiewen,@liangchenghui
Signed-off-by: @liangchenghui
pull/12312/MERGE
mindspore-ci-bot 4 years ago committed by Gitee
commit 31598d522e

@ -0,0 +1,6 @@
ARG FROM_IMAGE_NAME
FROM ${FROM_IMAGE_NAME}
RUN apt install libgl1-mesa-glx -y
COPY requirements.txt .
RUN pip3.7 install -r requirements.txt

@ -0,0 +1,4 @@
pycocotools
opencv-python
xml-python
Pillow

@ -27,3 +27,10 @@ config_map = {
}
config = config_map[using_model]
if config.num_ssd_boxes == -1:
num = 0
h, w = config.img_shape
for i in range(len(config.steps)):
num += (h // config.steps[i]) * (w // config.steps[i]) * config.num_default[i]
config.num_ssd_boxes = num

@ -21,7 +21,6 @@ config = ed({
"model": "ssd300",
"img_shape": [300, 300],
"num_ssd_boxes": 1917,
"neg_pre_positive": 3,
"match_threshold": 0.5,
"nms_threshold": 0.6,
"min_score": 0.1,

@ -20,8 +20,7 @@ from easydict import EasyDict as ed
config = ed({
"model": "ssd_mobilenet_v1_fpn",
"img_shape": [640, 640],
"num_ssd_boxes": 51150,
"neg_pre_positive": 3,
"num_ssd_boxes": -1,
"match_threshold": 0.5,
"nms_threshold": 0.6,
"min_score": 0.1,
@ -32,8 +31,8 @@ config = ed({
"lr_init": 0.01333,
"lr_end_rate": 0.0,
"warmup_epochs": 2,
"weight_decay": 4e-5,
"momentum": 0.9,
"weight_decay": 1.5e-4,
# network
"num_default": [6, 6, 6, 6, 6],
@ -48,7 +47,7 @@ config = ed({
"steps": (8, 16, 32, 64, 128),
"prior_scaling": (0.1, 0.2),
"gamma": 2.0,
"alpha": 0.75,
"alpha": 0.25,
"num_addition_layers": 4,
"use_anchor_generator": True,
"use_global_norm": True,

Loading…
Cancel
Save