deepinsight / mxnet-ssh Goto Github PK
View Code? Open in Web Editor NEWReproduce SSH (Single Stage Headless Face Detector) with MXNet
License: MIT License
Reproduce SSH (Single Stage Headless Face Detector) with MXNet
License: MIT License
Under the same input dimension, why do some images predict time of about 7 seconds, and some images only need a few hundred milliseconds?
anybody bumped into this 'out of memory' error when run test_ssh.py? any suggestions would be appreciated!
python3 test_ssh.py --dataset_path=/data/face_detector/widerface/ --prefix=/data/face_detecto
r/mxnet-SSH/vgg16 --gpu 0
/usr/local/lib/python3.5/dist-packages/h5py/init.py:36: FutureWarning: Conversion of the second argument of issubdtype from f loat
to np.floating
is deprecated. In future, it will be treated as np.float64 == np.dtype(float).type
.
from ._conv import register_converters as register_converters
INFO:root:Called with argument: Namespace(dataset='widerface', dataset_path='/data/face_detector/widerface/', epoch=0, gpu=0, has
rpn=True, image_set='val', network='ssh', output='data/output', prefix='/data/face_detector/mxnet-SSH/vgg16', proposal='rpn', pyra
mid=False, root_path='data', shuffle=False, thresh=0.05, vis=False)
test with Namespace(dataset='widerface', dataset_path='/data/face_detector/widerface/', epoch=0, gpu=0, has_rpn=True, image_set='v
al', network='ssh', output='data/output', prefix='/data/face_detector/mxnet-SSH/vgg16', proposal='rpn', pyramid=False, root_path='
data', shuffle=False, thresh=0.05, vis=False)
[19:53:50] src/nnvm/legacy_json_util.cc:209: Loading symbol saved by previous version v0.8.0. Attempting to upgrade...
[19:53:50] src/nnvm/legacy_json_util.cc:217: Symbol successfully upgraded!
means [103.939 116.779 123.68 ]
===================> 000
===================> 111
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/mxnet/symbol/symbol.py", line 1513, in simple_bind
ctypes.byref(exe_handle)))
File "/usr/local/lib/python3.5/dist-packages/mxnet/base.py", line 149, in check_call
raise MXNetError(py_str(_LIB.MXGetLastError()))
mxnet.base.MXNetError: [19:53:51] src/storage/./pooled_storage_manager.h:108: cudaMalloc failed: out of memory
https://github.com/deepinsight/mxnet-SSH/blob/master/test_ssh.py
Row 90: Why you have this step?
if len(scales)>1 and s==32 and im_scale==scales[-1]: continue
Thanks for your code. The result is promising. What is your gpu, how many gpus, what is the batch_size, how long you need to train the mode one time? thanks
INFO:root:Called with argument: Namespace(dataset='widerface', dataset_path='./images', epoch=0, gpu=7, has_rpn=True, image_set='val', network='ssh', output='data/output', prefix='model/e2e', proposal='rpn', pyramid=False, root_path='data', shuffle=False, thresh=0.05, vis=False)
test with Namespace(dataset='widerface', dataset_path='./images', epoch=0, gpu=7, has_rpn=True, image_set='val', network='ssh', output='data/output', prefix='model/e2e', proposal='rpn', pyramid=False, root_path='data', shuffle=False, thresh=0.05, vis=False)
Traceback (most recent call last):
File "run_test.py", line 280, in
main()
File "run_test.py", line 277, in main
test(args)
File "run_test.py", line 270, in test
detector = SSHDetector(args.prefix, args.epoch, args.gpu, test_mode=True)
File "run_test.py", line 45, in init
sym, arg_params, aux_params = mx.model.load_checkpoint(prefix, epoch)
File "/usr/local/lib/python2.7/dist-packages/mxnet/model.py", line 437, in load_checkpoint
symbol = sym.load('%s-symbol.json' % prefix)
File "/usr/local/lib/python2.7/dist-packages/mxnet/symbol/symbol.py", line 2620, in load
check_call(_LIB.MXSymbolCreateFromFile(c_str(fname), ctypes.byref(handle)))
File "/usr/local/lib/python2.7/dist-packages/mxnet/base.py", line 252, in check_call
raise MXNetError(py_str(_LIB.MXGetLastError()))
mxnet.base.MXNetError: [21:06:44] src/io/local_filesys.cc:199: Check failed: allow_null LocalFileSystem::Open "model/e2e-symbol.json": No such file or directory
title,
trying to compile:
from rcnn.symbol import *
from rcnn.core.loader import AnchorLoader, AnchorLoaderFPN, CropLoader
I used 640x640 to get trained model, it only can get mAP of 68.8 on hard subset of validation set of WIDER FACE. In the original paper, the image is that shorter side is 1200, and long side is not longer than 1600. So can you give me some advice? Thanks
can it for multi class classification ?And what should i do?
Thanks for your code, but I am confused about some parameters during training wider face. In the code,
Thank you for providing high quality code. What is the role of BBOX_MASK_THRESH?
Can you release a pretrained model, and i have make your code, and trained on the wider face, however, the result is poor. Thank you!!
INFO:root:output shape {'blockgrad0_output': (32, 800),
'blockgrad1_output': (32, 8, 400),
'blockgrad2_output': (32, 3200),
'blockgrad3_output': (32, 8, 1600),
'blockgrad4_output': (32, 12800),
'blockgrad5_output': (32, 8, 6400),
'rpn_bbox_loss_stride16_output': (32, 8, 1600),
'rpn_bbox_loss_stride32_output': (32, 8, 400),
'rpn_bbox_loss_stride8_output': (32, 8, 6400),
'rpn_cls_prob_stride16_output': (32, 2, 3200),
'rpn_cls_prob_stride32_output': (32, 2, 800),
'rpn_cls_prob_stride8_output': (32, 2, 12800)}
Traceback (most recent call last):
File "train_ssh.py", line 286, in
main()
File "train_ssh.py", line 283, in main
lr=args.lr, lr_step=args.lr_step)
File "train_ssh.py", line 102, in train_net
for k,v in arg_shape_dict.iteritems():
AttributeError: 'dict' object has no attribute 'iteritems'
Hi do you have a version of SSH that runs with Tensor RT, i tried running the existing model with it but cant seem to get it work, i would be grateful even for a nudge in the correct direction
is there have c++ version of test stage?
I run training code, but the speed is quite slow. only 20 images/sec even I set batch_image =32 on 1 GPU or 4 GPU even larger. Could you give some comments ?
Both model I trained by this code or your pretrained model doesnot work for the testing code. And I saw your SSH folder in the insightface project. The testing code of that folder detects faces via original image, I do not think, it can achieve 81.4% of mAP for hard set of validation set of WIDER FACE. So could you provide some advice? Thanks
I found your replay in the issues of sniper, I want to use c++ load the sniper model to inference for object detect, but I have failed . Do you have any idea?
thank you very much!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.