This is an automated email from the ASF dual-hosted git repository. zhreshold pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git
The following commit(s) were added to refs/heads/master by this push: new 384b736 Prep script and Fixes for single shot detector (SSD) (#9480) 384b736 is described below commit 384b736b4f4f518d23e31065b0800f350cdcac69 Author: Pedro Larroy <928489+lar...@users.noreply.github.com> AuthorDate: Sat Jan 20 05:31:09 2018 +0100 Prep script and Fixes for single shot detector (SSD) (#9480) * data, model and demo download script for ssd example * add __launch_bounds__ to multibox_detection kernel to prevent launch failure on volta --- example/ssd/data/demo/download_demo_images.py | 3 ++ example/ssd/dataset/testdb.py | 2 +- example/ssd/demo.py | 3 ++ example/ssd/init.sh | 58 +++++++++++++++++++++++++++ src/operator/contrib/multibox_detection.cu | 4 +- 5 files changed, 68 insertions(+), 2 deletions(-) diff --git a/example/ssd/data/demo/download_demo_images.py b/example/ssd/data/demo/download_demo_images.py index 554ba7e..425f713 100755 --- a/example/ssd/data/demo/download_demo_images.py +++ b/example/ssd/data/demo/download_demo_images.py @@ -1,3 +1,6 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- + # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information diff --git a/example/ssd/dataset/testdb.py b/example/ssd/dataset/testdb.py index 9a4b985..2f982a4 100644 --- a/example/ssd/dataset/testdb.py +++ b/example/ssd/dataset/testdb.py @@ -16,7 +16,7 @@ # under the License. import os -from imdb import Imdb +from .imdb import Imdb class TestDB(Imdb): diff --git a/example/ssd/demo.py b/example/ssd/demo.py old mode 100644 new mode 100755 index 8106eb5..0480bdd --- a/example/ssd/demo.py +++ b/example/ssd/demo.py @@ -1,3 +1,6 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- + # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information diff --git a/example/ssd/init.sh b/example/ssd/init.sh new file mode 100755 index 0000000..53104bb --- /dev/null +++ b/example/ssd/init.sh @@ -0,0 +1,58 @@ +#!/bin/bash + +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +# +# Train SSD with Pascal VOC +# +set -e +set -x + + +function download_pascal_voc() { + pushd . + cd data + wget -c --show-progress http://host.robots.ox.ac.uk/pascal/VOC/voc2012/VOCtrainval_11-May-2012.tar + wget -c --show-progress http://host.robots.ox.ac.uk/pascal/VOC/voc2007/VOCtrainval_06-Nov-2007.tar + wget -c --show-progress http://host.robots.ox.ac.uk/pascal/VOC/voc2007/VOCtest_06-Nov-2007.tar + tar -xvf VOCtrainval_11-May-2012.tar + tar -xvf VOCtrainval_06-Nov-2007.tar + tar -xvf VOCtest_06-Nov-2007.tar + popd +} + +function download_model() { + pushd . + MODELFILEURL="https://github.com/zhreshold/mxnet-ssd/releases/download/v0.6/resnet50_ssd_512_voc0712_trainval.zip" + MODELFILE="resnet50_ssd_512_voc0712_trainval.zip" + cd model + wget -c $MODELFILEURL + unzip $MODELFILE + popd +} + +function download_demo_images() { + pushd . + cd data/demo + ./download_demo_images.py + popd +} + +download_pascal_voc +download_model +download_demo_images diff --git a/src/operator/contrib/multibox_detection.cu b/src/operator/contrib/multibox_detection.cu index 6db8c55..98151f8 100644 --- a/src/operator/contrib/multibox_detection.cu +++ b/src/operator/contrib/multibox_detection.cu @@ -51,7 +51,9 @@ __device__ void CalculateOverlap(const DType *a, const DType *b, DType *iou) { } template<typename DType> -__global__ void DetectionForwardKernel(DType *out, const DType *cls_prob, +__global__ +__launch_bounds__(cuda::kMaxThreadsPerBlock) +void DetectionForwardKernel(DType *out, const DType *cls_prob, const DType *loc_pred, const DType *anchors, DType *temp_space, const int num_classes, const int num_anchors, const float threshold, -- To stop receiving notification emails like this one, please contact ['"comm...@mxnet.apache.org" <comm...@mxnet.apache.org>'].