GithubHelp home page GithubHelp logo

mcnssd's Introduction

Single Shot MultiBox Detector

NOTICE: This repo is no longer maintained. For an easy-to-use object detector that is actively maintained, I recommend considering the PyTorch Mask R-CNN implementation.

This directory contains code to train and evaluate the SSD object detector described in the paper:

SSD: Single Shot MultiBox Detector
by Wei Liu, Dragomir Anguelov, Dumitru Erhan, Christian Szegedy, 
Scott Reed, Cheng-Yang Fu, Alexander C. Berg

The code is based on the caffe implementation made available by Wei Liu.

Demo

Running the ssd_demo.m script will download a model trained on pascal voc 2007 data and run it on a sample image to produce the figure below:

Performance

The matconvnet training code aims to reproduce the results achieved by the caffe training routine. Using the "zoom out" data augmentation scheme described in the updated SSD paper the model trained with matconvnet achieves a similar mAP on the 2007 test set to the caffe model.

Test Set Results - comparison of the ssd-pascal-vggvd-300 model:

-------------- -------------------- ------------------------
               trained with caffe   trained with matconvnet
-------------- -------------------- ------------------------
aeroplane      80.53                82.39
bicycle        83.77                85.82
bird           76.40                77.40
boat           71.53                71.43
bottle         50.17                52.82
bus            86.90                86.54
car            86.05                86.20
cat            88.57                87.04
chair          59.96                60.07
cow            81.39                81.59
diningtable    76.30                75.57
dog            85.92                84.65
horse          86.60                86.65
motorbike      83.62                84.94
person         79.57                79.47
pottedplant    52.62                50.30
sheep          79.22                79.19
sofa           78.89                78.82
train          86.52                87.02
tvmonitor      76.31                77.15
-------------- -------------------- ------------------------
mean           77.54                77.75
-------------- -------------------- ------------------------

Pre-trained models

The public caffe models released by Wei Liu have been imported into matconvnet for use. The MobileNet model released by chuanqi305 has also been imported. In addition, some sample models trained with the matconvnet implementation have been made available. These can be downloaded directly from here (a few pre-trained models will be downloaded automatically upon running the core/ssd_pretrained_benchmarks.m script).

Speed

The pre-trained ssd-pascal-vggvd-300 model runs at approximately 58 Hz on a Tesla M-40.

Dependencies

CPU-mode:

  • matconvnet (tested with v1.0-beta23, v1.0-beta24)
  • MATLAB (tested with 2016a)

additional GPU-mode dependency:

  • CUDA (tested with v7.5, v8)

mcnSSD also requires the following two modules:

Both of these can be setup directly with vl_contrib (i.e. run vl_contrib install <module-name> then vl_contrib setup <module-name>).

Installation

The easiest way to use this module is to install it with the vl_contrib package manager. mcnSSD can be installed with the following commands from the root directory of your MatConvNet installation:

vl_contrib('install', 'mcnSSD') ;
vl_contrib('compile', 'mcnSSD') ;
vl_contrib('setup', 'mcnSSD') ;
vl_contrib('test', 'mcnSSD') ; % optional

Demo

The ssd_demo.m script gives an example of how to run a pre-trained model on a single image. The core/ssd_pretrained_benchmarks.m will download and evaluate a range of pre-trained SSD models on the Pascal VOC 2007 test set.

An example of model training can be found in pascal/ssd_pascal_train.m

FAQ

  1. If you get the following error: Undefined function or variable 'vl_argparsepos', it indicates that autonn is not on your path. It can be added by running vl_contrib install autonn ; vl_contrib setup autonn ; from the root of your MatConvNet install.

mcnssd's People

Contributors

albanie avatar vedaldi avatar zacr0 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

mcnssd's Issues

vl_nnmultiboxdetector.cpp does not pass mex compilation

Thank you for providing this port. What compiler is your mex setup designed to use?

Mine is Microsoft Visual C++ 2013 pro, Matlab 2015a, Cuda 8.0, which runs fine until mex reaches vl_nnmultiboxdetector.cpp (on the vl_contrib('compile', 'mcnSSD', 'contribUrl', 'github.com/albanie/matconvnet-contrib-test/') ; compile step)

Mex error returns (partial output):
vl_compilenn: MEX CC: -outdir C:\Users\kc0tw\Dropbox\ClutterDetection\matconvnet-contrib\matconvnet-contrib\contrib\mcnSSD\matlab\mex.build C:\Users\kc0tw\Dropbox\ClutterDetection\matconvnet-contrib\matconvnet-contrib\contrib\mcnSSD\matlab\src\vl_nnmultiboxdetector.cpp -c -DNDEBUG -DENABLE_DOUBLE -D__SSSE3__ -IC:\Users\kc0tw\Dropbox\ClutterDetection\matconvnet-contrib\matconvnet-contrib\matlab\src -largeArrayDims CXXFLAGS=$CXXFLAGS CXXOPTIMFLAGS=$CXXOPTIMFLAGS
Building with 'Microsoft Visual C++ 2013 Professional'.
Error using mex
vl_nnmultiboxdetector.cpp
c:\users\kc0tw\dropbox\clutterdetection\matconvnet-contrib\matconvnet-contrib\contrib\mcnssd\matlab\src\vl_nnmultiboxdetector.cu(79) : warning C4305: 'initializing' : truncation from
'double' to 'float'

Which results in Matlab error:
Error in vl_compilenn>mex_compile (line 544)
mex(mopts{:}) ;

Error in vl_compilenn (line 500)
mex_compile(opts, srcs{i}, objfile, [flags.cc, flags.mexcc]) ;

Error in compile_mcnSSD (line 15)
vl_compilenn(opts{:}, varargin{:}, 'preCompileFn', @preCompileFn,'verbose',1) ;

Error in vl_contrib>module_compile (line 210)
handle(varargin{:});

Error in vl_contrib (line 93)
module_compile(module, varargin{:});

I'm guessing this will have to do with the mex compiler version.

seems some problems to compile

vl_contrib('compile', 'mcnSSD', 'contribUrl', 'github.com/albanie/matconvnet-contrib-test/') ;
202 if opts.enableGpu, ext = 'cu' ; else ext='cpp' ; end
vl_compilenn: CUDA: MEX config file: 'C:\Program Files\MATLAB\R2017a\toolbox\distcomp\gpu\extern\src\mex\win64\mex_CUDA_win64.xml'
vl_compilenn: * Compiler and linker configurations *
vl_compilenn: intermediate build products directory: X:\matconvnet-contrib\matlab\mex.build
vl_compilenn: MEX files: X:\matconvnet-contrib\matlab\mex/
vl_compilenn: MEX options [CC CPU]: -largeArrayDims CXXFLAGS=$CXXFLAGS CXXOPTIMFLAGS=$CXXOPTIMFLAGS
vl_compilenn: MEX options [LINK]: -largeArrayDims LDFLAGS=$LDFLAGS LINKLIBS=gdiplus.lib $LINKLIBS
vl_compilenn: * Reading images *
vl_compilenn: vl_imreadjpeg enabled
vl_compilenn: image library: gdiplus
vl_compilenn: image library compile flags:
vl_compilenn: image library link flags: gdiplus.lib
vl_compilenn: MEX CC: -outdir X:\matconvnet-contrib\contrib\mcnSSD\matlab\mex.build\bits X:\matconvnet-contrib\matlab\src\bits\data.cpp -c -DNDEBUG -DENABLE_DOUBLE -D__SSSE3__ -IX:\matconvnet-contrib\matlab\src -largeArrayDims CXXFLAGS=$CXXFLAGS CXXOPTIMFLAGS=$CXXOPTIMFLAGS
Building with 'Microsoft Visual C++ 2017'.
MEX completed successfully.
vl_compilenn: MEX CC: -outdir X:\matconvnet-contrib\contrib\mcnSSD\matlab\mex.build\bits X:\matconvnet-contrib\matlab\src\bits\datamex.cpp -c -DNDEBUG -DENABLE_DOUBLE -D__SSSE3__ -IX:\matconvnet-contrib\matlab\src -largeArrayDims CXXFLAGS=$CXXFLAGS CXXOPTIMFLAGS=$CXXOPTIMFLAGS
Building with 'Microsoft Visual C++ 2017'.
MEX completed successfully.
vl_compilenn: MEX CC: -outdir X:\matconvnet-contrib\contrib\mcnSSD\matlab\mex.build\bits\impl X:\matconvnet-contrib\matlab\src\bits\impl\copy_cpu.cpp -c -DNDEBUG -DENABLE_DOUBLE -D__SSSE3__ -IX:\matconvnet-contrib\matlab\src -largeArrayDims CXXFLAGS=$CXXFLAGS CXXOPTIMFLAGS=$CXXOPTIMFLAGS
Building with 'Microsoft Visual C++ 2017'.
MEX completed successfully.
vl_compilenn: MEX CC: -outdir X:\matconvnet-contrib\contrib\mcnSSD\matlab\mex.build\bits X:\matconvnet-contrib\contrib\mcnSSD\matlab\src\bits\nnmultiboxdetector.cpp -c -DNDEBUG -DENABLE_DOUBLE -D__SSSE3__ -IX:\matconvnet-contrib\matlab\src -largeArrayDims CXXFLAGS=$CXXFLAGS CXXOPTIMFLAGS=$CXXOPTIMFLAGS
Building with 'Microsoft Visual C++ 2017'.
MEX completed successfully.
vl_compilenn: MEX CC: -outdir X:\matconvnet-contrib\contrib\mcnSSD\matlab\mex.build\bits\impl X:\matconvnet-contrib\contrib\mcnSSD\matlab\src\bits\impl\multiboxdetector_cpu.cpp -c -DNDEBUG -DENABLE_DOUBLE -D__SSSE3__ -IX:\matconvnet-contrib\matlab\src -largeArrayDims CXXFLAGS=$CXXFLAGS CXXOPTIMFLAGS=$CXXOPTIMFLAGS
Building with 'Microsoft Visual C++ 2017'.
MEX completed successfully.
vl_compilenn: MEX CC: -outdir X:\matconvnet-contrib\contrib\mcnSSD\matlab\mex.build X:\matconvnet-contrib\contrib\mcnSSD\matlab\src\vl_nnmultiboxdetector.cpp -c -DNDEBUG -DENABLE_DOUBLE -D__SSSE3__ -IX:\matconvnet-contrib\matlab\src -largeArrayDims CXXFLAGS=$CXXFLAGS CXXOPTIMFLAGS=$CXXOPTIMFLAGS
Building with 'Microsoft Visual C++ 2017'.
Error using mex
vl_nnmultiboxdetector.cpp
x:\matconvnet-contrib\contrib\mcnssd\matlab\src\vl_nnmultiboxdetector.cu(79): warning C4305: 'initializing': truncation from 'double' to
'float'
x:\matconvnet-contrib\contrib\mcnssd\matlab\src\vl_nnmultiboxdetector.cu(80): warning C4305: 'initializing': truncation from 'double' to
'float'
x:\matconvnet-contrib\contrib\mcnssd\matlab\src\vl_nnmultiboxdetector.cu(143): warning C4244: '=': conversion from 'float' to 'int',
possible loss of data
x:\matconvnet-contrib\contrib\mcnssd\matlab\src\vl_nnmultiboxdetector.cu(158): warning C4267: 'initializing': conversion from 'size_t' to
'int', possible loss of data
x:\matconvnet-contrib\contrib\mcnssd\matlab\src\vl_nnmultiboxdetector.cu(177): warning C4267: 'initializing': conversion from 'size_t' to
'int', possible loss of data
x:\matconvnet-contrib\contrib\mcnssd\matlab\src\vl_nnmultiboxdetector.cu(178): error C2146: syntax error: missing ')' before identifier 'or'
x:\matconvnet-contrib\contrib\mcnssd\matlab\src\vl_nnmultiboxdetector.cu(178): error C3861: 'or': identifier not found
x:\matconvnet-contrib\contrib\mcnssd\matlab\src\vl_nnmultiboxdetector.cu(178): error C2059: syntax error: ')'
x:\matconvnet-contrib\contrib\mcnssd\matlab\src\vl_nnmultiboxdetector.cu(179): error C2059: syntax error: ';'
x:\matconvnet-contrib\contrib\mcnssd\matlab\src\vl_nnmultiboxdetector.cu(183): error C2059: syntax error: 'if'
x:\matconvnet-contrib\contrib\mcnssd\matlab\src\vl_nnmultiboxdetector.cu(183): error C2143: syntax error: missing ';' before '{'
x:\matconvnet-contrib\contrib\mcnssd\matlab\src\vl_nnmultiboxdetector.cu(183): error C2447: '{': missing function header (old-style formal
list?)
x:\matconvnet-contrib\contrib\mcnssd\matlab\src\vl_nnmultiboxdetector.cu(192): error C2065: 'locPreds': undeclared identifier
x:\matconvnet-contrib\contrib\mcnssd\matlab\src\vl_nnmultiboxdetector.cu(192): error C2228: left of '.getDataType' must have
class/struct/union
x:\matconvnet-contrib\contrib\mcnssd\matlab\src\vl_nnmultiboxdetector.cu(192): note: type is 'unknown-type'
x:\matconvnet-contrib\contrib\mcnssd\matlab\src\vl_nnmultiboxdetector.cu(193): error C2065: 'keepTopK': undeclared identifier
x:\matconvnet-contrib\contrib\mcnssd\matlab\src\vl_nnmultiboxdetector.cu(193): error C2065: 'batchSize': undeclared identifier
x:\matconvnet-contrib\contrib\mcnssd\matlab\src\vl_nnmultiboxdetector.cu(194): error C3927: '->': trailing return type is not allowed after
a non-function declarator
x:\matconvnet-contrib\contrib\mcnssd\matlab\src\vl_nnmultiboxdetector.cu(194): error C3484: syntax error: expected '->' before the return
type
x:\matconvnet-contrib\contrib\mcnssd\matlab\src\vl_nnmultiboxdetector.cu(194): error C3613: missing return type after '->' ('int' assumed)
x:\matconvnet-contrib\contrib\mcnssd\matlab\src\vl_nnmultiboxdetector.cu(194): error C4430: missing type specifier - int assumed. Note: C++
does not support default-int
x:\matconvnet-contrib\contrib\mcnssd\matlab\src\vl_nnmultiboxdetector.cu(194): error C2371: 'output': redefinition; different basic types
x:\matconvnet-contrib\contrib\mcnssd\matlab\src\vl_nnmultiboxdetector.cu(191): note: see declaration of 'output'
x:\matconvnet-contrib\contrib\mcnssd\matlab\src\vl_nnmultiboxdetector.cu(194): error C2146: syntax error: missing ';' before identifier
'initWithZeros'
x:\matconvnet-contrib\contrib\mcnssd\matlab\src\vl_nnmultiboxdetector.cu(197): error C2059: syntax error: 'if'
x:\matconvnet-contrib\contrib\mcnssd\matlab\src\vl_nnmultiboxdetector.cu(197): error C2143: syntax error: missing ';' before '{'
x:\matconvnet-contrib\contrib\mcnssd\matlab\src\vl_nnmultiboxdetector.cu(197): error C2447: '{': missing function header (old-style formal
list?)
x:\matconvnet-contrib\contrib\mcnssd\matlab\src\vl_nnmultiboxdetector.cu(214): error C4430: missing type specifier - int assumed. Note: C++
does not support default-int
x:\matconvnet-contrib\contrib\mcnssd\matlab\src\vl_nnmultiboxdetector.cu(214): error C2371: 'error': redefinition; different basic types
x:\matconvnet-contrib\contrib\mcnssd\matlab\src\vl_nnmultiboxdetector.cu(213): note: see declaration of 'error'
x:\matconvnet-contrib\contrib\mcnssd\matlab\src\vl_nnmultiboxdetector.cu(216): error C2065: 'locPreds': undeclared identifier
x:\matconvnet-contrib\contrib\mcnssd\matlab\src\vl_nnmultiboxdetector.cu(217): error C2065: 'confPreds': undeclared identifier
x:\matconvnet-contrib\contrib\mcnssd\matlab\src\vl_nnmultiboxdetector.cu(218): error C2065: 'priors': undeclared identifier
x:\matconvnet-contrib\contrib\mcnssd\matlab\src\vl_nnmultiboxdetector.cu(219): error C2065: 'nmsTopK': undeclared identifier
x:\matconvnet-contrib\contrib\mcnssd\matlab\src\vl_nnmultiboxdetector.cu(220): error C2065: 'keepTopK': undeclared identifier
x:\matconvnet-contrib\contrib\mcnssd\matlab\src\vl_nnmultiboxdetector.cu(221): error C2065: 'numClasses': undeclared identifier
x:\matconvnet-contrib\contrib\mcnssd\matlab\src\vl_nnmultiboxdetector.cu(222): error C2065: 'nmsThresh': undeclared identifier
x:\matconvnet-contrib\contrib\mcnssd\matlab\src\vl_nnmultiboxdetector.cu(223): error C2065: 'confThresh': undeclared identifier
x:\matconvnet-contrib\contrib\mcnssd\matlab\src\vl_nnmultiboxdetector.cu(224): error C2065: 'backgroundLabel': undeclared identifier
x:\matconvnet-contrib\contrib\mcnssd\matlab\src\vl_nnmultiboxdetector.cu(230): error C2059: syntax error: 'if'
x:\matconvnet-contrib\contrib\mcnssd\matlab\src\vl_nnmultiboxdetector.cu(230): error C2143: syntax error: missing ';' before '{'
x:\matconvnet-contrib\contrib\mcnssd\matlab\src\vl_nnmultiboxdetector.cu(230): error C2447: '{': missing function header (old-style formal
list?)
x:\matconvnet-contrib\contrib\mcnssd\matlab\src\vl_nnmultiboxdetector.cu(233): error C2466: cannot allocate an array of constant size 0
x:\matconvnet-contrib\contrib\mcnssd\matlab\src\vl_nnmultiboxdetector.cu(233): error C4430: missing type specifier - int assumed. Note: C++
does not support default-int
x:\matconvnet-contrib\contrib\mcnssd\matlab\src\vl_nnmultiboxdetector.cu(234): error C2059: syntax error: '}'
x:\matconvnet-contrib\contrib\mcnssd\matlab\src\vl_nnmultiboxdetector.cu(234): error C2143: syntax error: missing ';' before '}'

Error in vl_compilenn>mex_compile (line 544)
mex(mopts{:}) ;

Error in vl_compilenn (line 500)
mex_compile(opts, srcs{i}, objfile, [flags.cc, flags.mexcc]) ;

Error in compile_mcnSSD (line 15)
vl_compilenn(opts{:}, varargin{:}, 'preCompileFn', @preCompileFn) ;

Error in vl_contrib>module_compile (line 210)
handle(varargin{:});

Error in vl_contrib (line 93)
module_compile(module, varargin{:});

SSD not generate any prediction!

Hi @albanie
I have trained mcnSSD on my on dataset.
everything looks good (below figure), but after training, when i test it on the validation/train set it not generate any boxes in the output.
train_process
I carefully maintain pre-processing step in the test phase to be equal with training phase.
Note: I look at conf-loss layer during training, I observe that probability of first class (Background) higher than second class (in 2 class ssd). Do you have an recommendation to solve this problem?

the class_loss loc_loss mbox_loss are 'NaN'

hello, when I trained the ssd by your code, in the iteration 1, the class_loss loc_loss mbox_loss are 21.07 2.914 23.989, but after the iteration 1 , all of the loss turned to 'NaN', Do you know how to solve it? thank you!

More details in the training and evaluation fail

I am trying to train my own dataset in the format of Pascal VOC, so I am trying to use the function ssd_pascal_train with most of the options as they are in the code you provided (but with CPU only and the classes are different). I tried to run with the model vgg-vd-16-reduced. Everyting works fine until the variable all_losses receives the value of a cell of layers, this leads to the error that has been complicating my life in the last two weeks:

Warning: The model appears to be simplenn model. Using fromSimpleNN instead.

In dagnn.DagNN.loadobj (line 19)
In ssd_zoo (line 29)
In ssd_init (line 27)
In ssd_train (line 19)
In ssd_pascal_train (line 213)
Error using Layer.fromDagNN (line 65)
Input must be a DagNN or SimpleNN.

Error in Net (line 93)
objects = Layer.fromDagNN(objects{:}) ;

Error in ssd_init (line 185)
net = Net(all_losses) ;

Error in ssd_train (line 19)
net = opts.modelOpts.net_init(opts) ;

Error in ssd_pascal_train (line 213)
ssd_train(expDir, opts) ;

Can you please, please provide me some guidance, I don't really know what I can do to fix it.

cannot compile matconvnet-1.0-beta25

When i compile matconvnet-1.0-beta25, i get the fellowing error:

警告: Version 7.0 of the CUDA toolkit could not be found. If installed, set MW_NVCC_PATH
environment variable to location of nvcc compiler.

In mexcuda (line 157)
In vl_compilenn>mexcuda_compile (line 603)
In vl_compilenn (line 489)
错误使用 mex
未找到支持的编译器或 SDK。有关选项,请访问
http://www.mathworks.com/support/compilers/R2015b/glnxa64.html。

出错 mexcuda (line 157)
[varargout{1:nargout}] = mex(mexArguments{:});

出错 vl_compilenn>mexcuda_compile (line 603)
mexcuda(args{:}) ;

出错 vl_compilenn (line 489)
mexcuda_compile(opts, srcs{i}, objfile, flags) ;

My system setting is ubuntu16.04,cuda8.0 ,matlab2015b. And i can compile matconvnet-1.0-beta24 and matconvnet-1.0-beta23 successfully. Could you give me some help about solving this problem ? Thank you.

Questions about ssd_demo?

I've successful compile this folder and run the ssd_demo. But It took 3 seconds to run ssd_demo.m in GPU mode (GTX1060)., and every time I run ssd_demo.m I need to compile it again or the code go wrong. Are these situations normal or something I can do to fix these?

Missing 'vl_nms' function

Hi,
I was trying to perform multi-scale evaluation and I got a Undefined function or variable 'vl_nms'. error on ssd_evaluation.mat line 261:
keepIdx = vl_nms(candidates, ... 'overlapThreshold', opts.msOpts.nmsThresh, ... 'topK', size(preds_,1)) ;

Am I missing any dependencies, or is this function not implemented yet? Thanks.

Missing Some functions!

Hello @albanie
At first thank you for work on matconvnet-contrib.
Now, i try to use mcnSSD on my own dataset. during developing, i need some functions like "ssd_add_map" & "ssd_viz_get_batch" which are not included in the repository.
Is this functions implemented?

#include <bits/data.hpp> in nnmultiboxdetector.hpp

In the file '\matconvnet-1.0-beta25\contrib\mcnSSD\matlab\src\bits\nnmultiboxdetector.hpp', it includes
#include <bits/data.hpp>

'data.hpp' is in the folder 'matconvnet-1.0-beta25\matlab\src\bits'.

On my windows machine, to compile it 'matconvnet-1.0-beta25\matlab\src' should be added to the environment variable INCLUDE.

Input #2 expected to be a cell array in "vl_nnmatchpriors"

Thank you so much @albanie. The previous problems (#14) have solved.
But I think there is something else that is going wrong in vl_nnmatchpriors.
When I want to use the output generated by training procedure (for example net-epoch-50.mat) in test mode, I face an error at the following assertion:

  cellfun(@(x) assert(all(all(x(:,3:4) - x(:,1:2) > 0)), ...
          'MULTIBOXCODER:invalidGroundTruthBoxes', ...
          'ground truth boxes must be in the (xmin, ymin, xmax, ymax) format'), ...
          gt) ;

This is the exact error message:

Input #2 expected to be a cell array, was double instead.

I think since in this case, the gt argument is an empty 0x0 double array, there should be some problems.

A question about the SSD training

Hi, albanie,

Thanks a lot for your work.

Recently, I'd like to use SSD. To make sure the SSD work fine, I first tried to train the SSD on the provided VOC. I did not change anything. However, in training, the loss becomes weird as follows:

ssd_pascal_train
Experiment name: ssd-pascal-0712-vt-32-300-flip-patch-distort

Training set: 0712
Testing set: 07

Prune checkpoints: 0
GPU: 1
Batch size: 32

Train + val: 1
Flip: 1
Patches: 1
Zoom: 0
Distort: 1

Learning Rate Schedule:
0.001 0.001 (warmup)
0.001 for 73 epochs
0.0001 for 35 epochs

Run experiment with these parameters? y or n
y
Warning: The model appears to be simplenn model. Using fromSimpleNN instead.
In dagnn.DagNN.loadobj (line 19)
In ssd_zoo (line 29)
In ssd_init (line 28)
In ssd_train (line 19)
In ssd_pascal_train (line 213)
Warning: The most recent version of vl_nnloss normalizes the loss by the batch size. The current
version does not. A workaround is being used, but consider updating MatConvNet.
In cnn_train_autonn (line 32)
In ssd_train (line 20)
In ssd_pascal_train (line 213)
cnn_train_autonn: resetting GPU

ans =

CUDADevice with properties:

                  Name: 'GeForce GTX 1080'
                 Index: 1
     ComputeCapability: '6.1'
        SupportsDouble: 1
         DriverVersion: 9.1000
        ToolkitVersion: 8
    MaxThreadsPerBlock: 1024
      MaxShmemPerBlock: 49152
    MaxThreadBlockSize: [1024 1024 64]
           MaxGridSize: [2.1475e+09 65535 65535]
             SIMDWidth: 32
           TotalMemory: 8.5899e+09
       AvailableMemory: 7.0175e+09
   MultiprocessorCount: 20
          ClockRateKHz: 1809500
           ComputeMode: 'Default'
  GPUOverlapsTransfers: 1
KernelExecutionTimeout: 1
      CanMapHostMemory: 1
       DeviceSupported: 1
        DeviceSelected: 1

train: epoch 01: 1/538: 2.6 (2.6) Hz conf_loss: 19.484 loc_loss: 2.778 mbox_loss: 22.263
train: epoch 01: 2/538: 2.9 (3.2) Hz conf_loss: 16.702 loc_loss: 2.812 mbox_loss: 19.514
train: epoch 01: 3/538: 3.0 (3.1) Hz conf_loss: 16.259 loc_loss: 2.886 mbox_loss: 19.145
train: epoch 01: 4/538: 3.0 (3.2) Hz conf_loss: 15.540 loc_loss: 2.796 mbox_loss: 18.336
train: epoch 01: 5/538: 3.2 (3.2) Hz conf_loss: 15.562 loc_loss: 2.812 mbox_loss: 18.374
train: epoch 01: 6/538: 3.2 (3.1) Hz conf_loss: 16.118 loc_loss: 2.863 mbox_loss: 18.981
train: epoch 01: 7/538: 3.2 (3.1) Hz conf_loss: 19.285 loc_loss: 3.871 mbox_loss: 23.156
train: epoch 01: 8/538: 3.2 (3.3) Hz conf_loss: 1031.250 loc_loss: 111.065 mbox_loss: 1142.315
train: epoch 01: 9/538: 3.2 (3.2) Hz conf_loss: 3470643036412389161829400576.000 loc_loss: 614700336259389324632522752.000 mbox_loss: 4085343446458754781300129792.000
train: epoch 01: 10/538: 3.2 (3.1) Hz conf_loss: NaN loc_loss: NaN mbox_loss: NaN
train: epoch 01: 11/538: 3.2 (3.3) Hz conf_loss: NaN loc_loss: NaN mbox_loss: NaN
train: epoch 01: 12/538: 3.2 (3.1) Hz conf_loss: NaN loc_loss: NaN mbox_loss: NaN
train: epoch 01: 13/538: 3.2 (3.2) Hz conf_loss: NaN loc_loss: NaN mbox_loss: NaN
train: epoch 01: 14/538: 3.2 (3.3) Hz conf_loss: NaN loc_loss: NaN mbox_loss: NaN
train: epoch 01: 15/538: 3.2 (3.2) Hz conf_loss: NaN loc_loss: NaN mbox_loss: NaN
train: epoch 01: 16/538: 3.2 (3.2) Hz conf_loss: NaN loc_loss: NaN mbox_loss: NaN
train: epoch 01: 17/538:Operation terminated by user during Net/eval (line 136)

Could you give me some help to solve this problem? or how does it happen?

Thanks

where is 'last_compile_opts.mat?

When I run compile_mcnSSD.m, matlab program throw an below error
index exceeds matrix dimensions
error: compile_mcnSSD>selectCompileOpts (line 24)
s = opts{1} ;

error: compile_mcnSSD (line 13)
opts = selectCompileOpts(opts) ;

I guess.. that the reason for the error is that the file in this folder (vl_roontnn/matlab/mex/.build, last_compile_opts.mat) does not exist. Also, there is no folder (vl_roontnn/matlab/mex/.build).

function compile_mcnSSD(varargin) % compile the C++/CUDA components of the SSD Detector

last_args_path = fullfile(vl_rootnn, 'matlab/mex/.build', ...
'last_compile_opts.mat') ;
opts = {} ;

if exist(last_args_path, 'file')
opts = {load(last_args_path)} ;
end

could you let me know some solves about this error?
Thanks..

'or' in the line 178 of vl_nnmultiboxdetector.cu

if ((numPriors != (confPreds.getDepth() / numClasses)) or (numPriors != (locPreds.getDepth() / 4))) {
vlmxError(VLMXE_IllegalArgument, "LOCPREDS and CONFPREDS do not match the given set of priors.") ;
}

'or' should be replaced by '|'.

Inconsistency between "vl_nnmatchpriors.m" and "matchPriors.m"

Hello;

It seems there is some inconsistency between "vl_nnmatchpriors.m" and "matchPriors.m", since when I tried to train the network using "ssd_pascal_train", I got stuck in the following errors:

Expected either a param-value pair or a structure.

Error in matchPriors (line 8)
opts = vl_argparse(opts, varargin, 'nonrecursive') ;

Unknown parameter 'matchRanker'

Error in matchPriors (line 8)
opts = vl_argparse(opts, varargin, 'nonrecursive') ;

I would be appreciated if you have a solution.

Is ssd_add_map implemented?

Hello, both in ssd_init.m and ssd_mini_init.m we can generate mAP during training by enabling opts.track_map, which will call the function ssd_add_map. However, while testing this option seems that this function is undefined and reports an error.

Is this function implemented? Am I missing any dependencies?

Thank you very much!

error in ssd_demo?

when I run the ssd_demo.m, an error occurred in vl_nnflatten.m, the dzdy has an empty matrix, and so the error in Line 31 of vl_nnflatten.m comes.
below is the error image:

error: vl_nnflatten (line 31)
y = reshape(dzdy{1}, sz) ;

error: dagnn.Flatten/forward (line 13)
outputs{1} = vl_nnflatten(inputs{1}, obj.axis, []) ;

error: dagnn.Layer/forwardAdvanced (line 85)
outputs = obj.forward(inputs, {net.params(par).value}) ;

error: dagnn.DagNN/eval (line 91)
obj.layers(l).block.forwardAdvanced(obj.layers(l)) ;

error ssd_demo (line 66)
net.eval({'data', im})

thank you for your attention!!!

Where is multiscale training code?

In ssd_pascal_evaluation.m, I find multiscale test options:

% configure multiscale options
opts.msOpts.use = false ;
opts.msOpts.scales = [1 1.4] ;

and in ssd_evaluation.m, the following codes implies that two different nets are used for multiscale evaluation,

% select net - original SSD is stored first, otherwise use modified net
if scale == 1, net_ = net{1} ; else, net_ = net{2} ; end

but in training code ssd_pascal_train.m, there is nothing about using multiscale training to generate different networks for specified input scales. Now I am trying to add multiscale training to SSD. Could you tell me implemetation details about your multiscale training experiment or give me some referenece codes?

Thanks.

is 'ssd_demo.m' not multibox-detection?

When I executed ssd_demo.m, I only got single detection result.
As far as I know, SSD is multibox-detetor (multi-objects detection).
Do you have plan to change or add the code (for multi-detection) to mcnSSD ?
Also, Do you have plan to add any code (to detect video format(real-time detection)) to mcnSSD .

I will also try to make the code (for multi-detection and detecting video format) through mcnSSD.

getCombinedPascalImdb Not exist!

Hi
I try to test training sample of SSD code on the pascal voc dataset, but got this error
"Undefined function or variable getCombinedPascalImdb".
i look for this function but i cannot find it on the project repository!
Also, i search this function in the google, but nothing found!

Issue with vgg_vd_16_reduced for mcn ssd pascal_demo_train

Hi,
I am trying to run ssd_pascal_train.m. Matconvnet is compiled using beta version 25 with GPU support and with Visual studio 2015. Demo code with pretrained network is running fine. But when trying to run ssd_pascal_train.m, it loads vgg_vd_16_reduced.mat. It seems incompatible somehow. Can you please suggest some solution.
I am pasting the error I am getting

Warning: The model appears to be simplenn model. Using fromSimpleNN instead.

In dagnn.DagNN.loadobj (line 19)
In ssd_zoo (line 29)
In ssd_init (line 27)
In ssd_train (line 19)
In ssd_pascal_train (line 217)
Error using Layer.fromDagNN (line 65)
Input must be a DagNN or SimpleNN.

Error in Net (line 93)
objects = Layer.fromDagNN(objects{:}) ;

Error in ssd_init (line 177)
net = Net(all_losses) ;

Error in ssd_train (line 19)
net = opts.modelOpts.net_init(opts) ;

Error in ssd_pascal_train (line 217)
ssd_train(expDir, opts) ;

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.