tencent / facedetection-dsfd Goto Github PK
View Code? Open in Web Editor NEW腾讯优图高精度双分支人脸检测器
License: Other
腾讯优图高精度双分支人脸检测器
License: Other
Specifically, I am referring to this
widerface_640 = {
'num_classes': 2,
#'lr_steps': (80000, 100000, 120000),
#'max_iter': 120000,
'lr_steps': (40000, 50000, 60000),
'max_iter': 60000,
'feature_maps': [160, 80, 40, 20, 10, 5],
'min_dim': 640,
'steps': [4, 8, 16, 32, 64, 128], # stride
'variance': [0.1, 0.2],
'clip': True, # make default box in [0,1]
'name': 'WIDERFace',
'l2norm_scale': [10, 8, 5],
'base': [64, 64, 'M', 128, 128, 'M', 256, 256, 256, 'C', 512, 512, 512, 'M', 512, 512, 512] ,
'extras': [256, 'S', 512, 128, 'S', 256],
'mbox': [1, 1, 1, 1, 1, 1] ,
#'mbox': [2, 2, 2, 2, 2, 2],
#'mbox': [4, 4, 4, 4, 4, 4],
'min_sizes': [16, 32, 64, 128, 256, 512],
'max_sizes': [],
#'max_sizes': [8, 16, 32, 64, 128, 256],
#'aspect_ratios': [ [],[],[],[],[],[] ], # [1,2] default 1
'aspect_ratios': [ [1.5],[1.5],[1.5],[1.5],[1.5],[1.5] ], # [1,2] default 1
'backbone': 'resnet152' , # vgg, resnet, detnet, resnet50
'feature_pyramid_network':True ,
'bottom_up_path': False ,
'feature_enhance_module': True ,
'max_in_out': True ,
'focal_loss': False ,
'progressive_anchor': True ,
'refinedet': False ,
'max_out': False ,
'anchor_compensation': False ,
'data_anchor_sampling': False ,
'overlap_thresh' : [0.4] ,
'negpos_ratio':3 ,
# test
'nms_thresh':0.3 ,
'conf_thresh':0.01 ,
'num_thresh':5000 ,
}
Which of them are true
during training?
Hello, when I ran demo.py, I faced with this error:
Traceback (most recent call last):
File "demo.py", line 256, in
test_oneimage()
File "demo.py", line 225, in test_oneimage
det0 = infer(net , img , transform , thresh , cuda , shrink)
File "demo.py", line 123, in infer
keep_index = np.where(det[:, 4] >= 0)[0]
TypeError: '>=' not supported between instances of 'builtin_function_or_method' and 'int'
I tryed to change the type of 0 but failed, how to solve it?
BTW, I use pytorch1.1, Is the version's problem?
Hi,
Do you have any plan to release the Res50-based DSFD pretrained model that has 22 fps as mentioned in the paper?
Many thanks
when i run python demo.py
, the issue
CUDA out of memory,Tried to allocate 62.00 MiB (GPU 0; 22.38 GiB total capacity; 20.83 GiB already allocated; 20.06 MiB free; 276.64 MiB cached)
what is the improvement compare with MTCNN ?
how can I use the eval_tools to eval the AP of the test data
ubuntu16.04+cuda10+pytorch1.1.1+NVIDIA2080
I have a problem, the "RuntimeError: CUDA out of memory. Tried to allocate 52.00 MiB (GPU 0; 7.76 GiB total capacity; 5.63 GiB already allocated; 29.69 MiB free; 82.78 MiB cached)"
Thanks
Hi
Thanks for sharing your work.
I think there is some problem with the trained model link, it opens up this website https://share.weiyun.com/567x0xQ
, but the webpage is blank and nothing happens,could you please check?
Thanks
Using in a conda env with Pytorch GPU, I get the following warning:
/tmp/pip-req-build-p5q91txh/torch/csrc/autograd/python_function.cpp:638: UserWarning: Legacy autograd function with non-static forward method is deprecated and will be removed in 1.3. Please use new-style autograd function with static forward method. (Example: https://pytorch.org/docs/stable/autograd.html#torch.autograd.Function)
Is this something that is a DIY?
Hey, I wonder which training dataset did you use to train the model?
Can you tell me?
ty a lot
HI
Is there no code for the training??
It gives CUDA out of memory error.
I want to extend this work for head detection. Can anyone tell me want I need to do?
I am sorry that I do not find the IAM module.Can u give me some tips?
the code will be open scource based on which framework??
the warning is as follows:
/home/anke/.conda/envs/dsfd/lib/python3.6/site-packages/torch/cuda/init.py:95: UserWarning:
Found GPU0 GeForce RTX 2080 Ti which requires CUDA_VERSION >= 9000 for
optimal performance and fast startup time, but your PyTorch was compiled
with CUDA_VERSION 8000. Please install the correct PyTorch binary
using instructions from http://pytorch.org
warnings.warn(incorrect_binary_warn % (d, name, 9000, CUDA_VERSION))
loading pretrained resnet model
(no error hints, but the resnet model is loading all the time)
Actully, my cuda version is 10.
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2018 NVIDIA Corporation
Built on Sat_Aug_25_21:08:01_CDT_2018
Cuda compilation tools, release 10.0, V10.0.130
i dont know how to solve it . could u pls do me a favor ?
looking forward to ur early reply .thx~
what kind of pretrain model was use in training? imagenet resnet pretrain or else?
I notice your code in widerface_val.py uses the following line:
testset = WIDERFaceDetection(args.widerface_root, 'val' , None, WIDERFaceAnnotationTransform())
which means you do not do any transform for WIDERFACE? Is that true?
For your other demo code, they all include TestBaseTransform, but this one doesn't. What is the required preprocessing for your code.
尝试着做训练.
发现在数据增强时,有时crop出的区域不是正方形,那么在后续resize(640*640)时,会改变image的比例,进而改变image中的face的比例.
这样会不会影响最终的效果??
I run demo.py on P100 cost 6-10 s -_-!
I notice that the visual threshold used in your work is very low (0.1 in demo and 0.01 in WIDERFACE). Wouldn't it result in a lot of false positives?
I tested your demo and it indeed gives many false positives. Is it normal?
Hi when I run the demo.py But I face the error How to solve it?
_pytest.config.exceptions.UsageError: usage: _jb_pytest_runner.py [options] [file_or_dir] [file_or_dir] [...]
_jb_pytest_runner.py: error: unrecognized arguments: --trained_model --save_folder eval_tools/ --visual_threshold 0.1 --img_root ./data/worlds-largest-selfie.jpg D:/Face/FaceDetection-DSFD-master/demo.py
inifile: None
rootdir: D:\Face\FaceDetection-DSFD-master
Hello, I'm trying to excute demo.py on google collab, it always gets a runtime error, i may solve this by reducing the batch size, but can you show me how ?
Thank you
I read about you training 8 images in a batch on P40. Is it possible to use the code with GTX 1080TI (12GB) with smaller batch size?
Currently I am inferencing on a 768x1024 image (doing 2x, 1x, 0.5x image pyramid with flips, giving a total of 6 images) and it takes about 20 sec per image on 1070ti. Other models like SFD or PyramidBox are much faster.
Is this slowness expected or am I using it wrong?
Hi, this work is pretty impressive. Would you please release the training code so that we can reconstruct it?
Thanks!
RuntimeError: CUDA out of memory. Tried to allocate 88.00 MiB (GPU 0; 7.93 GiB total capacity; 6.82 GiB already allocated; 68.50 MiB free; 65.36 MiB cached)
when I try to run the ./fddb_test.py,there will report “ ImportError: cannot import name 'draw_toolbox' ”,I checked the “./utils” folder and found there only an "augmentations.py", nothing about draw_toolbox, could anyone tell me what wrong I make?
你好
我在運行demo.py時,出現了錯誤:
Traceback (most recent call last):
File "demo.py", line 252, in <module>
test_oneimage()
File "demo.py", line 245, in test_oneimage
det = bbox_vote(det)
File "demo.py", line 73, in bbox_vote
det_accu_sum[:, 0:4] = np.sum(det_accu[:, 0:4], axis=0) / np.sum(det_accu[:, -1:])
File "/usr/local/lib/python3.6/dist-packages/torch/tensor.py", line 367, in __rdiv__
return self.reciprocal() * other
TypeError: mul(): argument 'other' (position 1) must be Tensor, not numpy.ndarray
我於前一行查看了det_accu:
print(det_accu)
[[884.7191162109375 687.6126098632812 996.62158203125 823.8545532226562
0.9999959468841553]
[884.49133 687.3231 996.8358 823.6817 tensor(1.0000)]
[884.73834 686.1709 996.74756 822.86896 tensor(1.0000)]]
錯誤是否與det_accu[0]有關?
如果有關,這錯誤怎麼產生?
我該如何處理這問題?
For case like using Resnet-152, one single GPU can not have big batch
I am interseted in
(1)How many P40 GPUs are used when training with Res152,
(2)what is the total batch, and the batch on each GPU
(3)Did you use SyncBN across GPUs?
Many Thanks !
Hi, I've re-implemented dsfd using vgg16 and it performs well but when I changed the backbone using resnet-50, the performance dropped. Is there any special details should be noticed? Appreciate your reply. thx.
I find this code didn't have First shot PAL .
你好,请问您之前跑过SSD-DEEPSORT-TF的程序代码吗,链接是https://github.com/search?q=ssd-deepsort,请问出现File "ssd_deepSort.py", line 234, in
f = create_box_encoder(args.reID_model, batch_size=1, loss_mode=args.loss_mode)
TypeError: create_box_encoder() got an unexpected keyword argument 'loss_mode'
您是怎样解决的呢,刚刚开始做,希望得到您的帮助
I have access to a 1080 or 1070, would it be possible to train on my GPU?
If not, can I at least use the provided model (parameters) and make predictions on my GPU?
您好,把预训练模型放到指定位置,然后运行demo.py时出现这个错误:
Missing key(s) in state_dict: "resnet.conv1.weight", "resnet.bn1.weight", "resnet.bn1.bias", "resnet.bn1.running_mean",。。。。。
Unexpected key(s) in state_dict: "layer1.0.weight", "layer1.1.weight", "layer1.1.bias", "layer1.1.running_mean", 。。。。
请问这个问题如何解决呢?是版本问题吗?
This is too big. Release something small.
Hi .
Will the code run on windows platform?
thank you
I get an Unplicling error when I try to load the pre-trained weights for the model:
File "widerface_val.py", line 222, in <module>
net.load_state_dict(torch.load(args.trained_model))
File "/home/marios/anaconda3/envs/pyramidbox/lib/python3.6/site-packages/torch/serialization.py", line 267, in load
return _load(f, map_location, pickle_module)
File "/home/marios/anaconda3/envs/pyramidbox/lib/python3.6/site-packages/torch/serialization.py", line 410, in _load
magic_number = pickle_module.load(f)
_pickle.UnpicklingError: invalid load key, '<'.
看了code,有几个疑问:
paper中的FEM模块(Fig3)和code实现(class FEM(nn.Module))时,貌似不一样.
paper中,输入分3份,然后每份分别经过3个dilation conv层.而code中,貌似并不是这样的操作.
multi_scale_test_pyramid算是对multi_scale_test一个补充吗??感觉就是单纯的用了更多的测试尺度.
多尺度测试时,为什么图片缩小时,要排除一些小结果(小于30的)??而图片放大时,要排除一些大结果(大于100的)??
paper中提到的:For 4 bounding box coordinates, we round down top left coordinates and round up width and height to expand the detection bounding box.这个在貌似在code中未体现?
还有一个关于PyramidBox的问题:
麻烦了!!
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.