Code Monkey home page Code Monkey logo

faceboxes's Introduction

Faceboxes

faceBoxes: a cpu real-time face detector with hight accuracy

Faceboxes is a SSD style object detector, it is designed for fast face detect, has a lightweight yet powerful network structure.

update

  1. Better network, our convolution module should be con_bn_relu like, not just conv.

  2. Double batch size, it used ~7G memory during train

  3. Add use_gpu Flag in predict, add detect_gpu function

Performance is better than before!

Efficiency is not good as official, 60FPS on 1080ti, much slower on CPU, it maybe slow in decoder.

usage

visdom
pytorch 0.2
torchvision

our data annotation

data/all/image01468.jpg 1 119 185 139 139 1
data/all/image01449.jpg 2 9 39 74 74 1 409 93 77 77 1

format:

path/image_name.jpg num_face x y w h 1 x y w h 1

Result

face1 face2

Fddb

和原论文的结果有些差距,主要问题可能是出现在数据增强部分。

tips:这里的另一条曲线DDFD(Multi-view Face Detection Using Deep Convolutional Neural Networks)只是拿来做个参考

fddb

faceboxes's People

Contributors

lxg2015 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  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  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  avatar  avatar

faceboxes's Issues

Help me ~~ RuntimeError: device-side assert triggered

/opt/conda/conda-bld/pytorch_1524584710464/work/aten/src/THC/THCTensorScatterGather.cu:97: void THCudaTensor_gatherKernel(TensorInfo<Real, IndexType>, TensorInfo<Real, IndexType>, TensorInfo<long, IndexType>, int, IndexType) [with IndexType = unsigned int, Real = float, Dims = 2]: block: [315,0,0], thread: [200,0,0] Assertion indexValue >= 0 && indexValue < src.sizes[dim] failed.
/opt/conda/conda-bld/pytorch_1524584710464/work/aten/src/THC/THCTensorScatterGather.cu:97: void THCudaTensor_gatherKernel(TensorInfo<Real, IndexType>, TensorInfo<Real, IndexType>, TensorInfo<long, IndexType>, int, IndexType) [with IndexType = unsigned int, Real = float, Dims = 2]: block: [315,0,0], thread: [219,0,0] Assertion indexValue >= 0 && indexValue < src.sizes[dim] failed.
/opt/conda/conda-bld/pytorch_1524584710464/work/aten/src/THC/THCTensorScatterGather.cu:97: void THCudaTensor_gatherKernel(TensorInfo<Real, IndexType>, TensorInfo<Real, IndexType>, TensorInfo<long, IndexType>, int, IndexType) [with IndexType = unsigned int, Real = float, Dims = 2]: block: [262,0,0], thread: [117,0,0] Assertion indexValue >= 0 && indexValue < src.sizes[dim] failed.
Traceback (most recent call last):
File "/home/t1070/TeddyZhang/DEEP_LEARNING/faceboxes-master/trainvisdom.py", line 116, in
train()
File "/home/t1070/TeddyZhang/DEEP_LEARNING/faceboxes-master/trainvisdom.py", line 73, in train
loss = criterion(loc_preds,loc_targets,conf_preds,conf_targets)
File "/home/t1070/anaconda2/envs/TeddyZhang/lib/python3.6/site-packages/torch/nn/modules/module.py", line 491, in call
result = self.forward(input, **kwargs)
File "/home/t1070/TeddyZhang/DEEP_LEARNING/faceboxes-master/multibox_loss.py", line 64, in forward
neg = self.hard_negative_mining(conf_loss, pos) # (1621824, (16,21824))
File "/home/t1070/TeddyZhang/DEEP_LEARNING/faceboxes-master/multibox_loss.py", line 29, in hard_negative_mining
conf_loss[pos.view(-1,1)] = 0 #去掉正样本,the rest are neg conf_loss
RuntimeError: device-side assert triggered

CReLU and BatchNorm

Hi, I'm reading the paper and curious about your implementation.

CReLU layer seems defined but not used. Instead, the code implements it again in the layer construction.

Also, the paper has a batch norm layer but it's not implemented.

What is the consideration for this implementation? Better performance?

Thanks

About input picture’s box

“path/image_name.jpg num_face x y w h 1 x y w h 1”,x and y is the center of the face box or the leftup ?
thank you!

loss爆炸了

在Wider数据集训练中也出现了loss爆炸,请问你是如何避免loss爆炸并且训练的呢?

doubts

Hi,
I made changes to your network. Added the batchnorm and xavier initializations, but i noticed you have used Adam optimizer while paper used SGD with decay and momentum, even the parameters are not the same of paper. I followed the same methodology, but my loss is still pretty high (~3.5),still need to do eval using widerface eval.

  1. Did you train it on widerface train+val or only train?
  2. For eval, did you use the evaluation tool present in site?

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.