Git Product home page Git Product logo

mogface's People

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

Watchers

 avatar  avatar  avatar

mogface's Issues

ValueError: too many values to unpack (expected 2)

I am trying to train the mogface with configurations from MogFace.yml to reproduce the best sota results on wider face but I am getting this error:
MogFace-master/train.py", line 138, in
images, targets = next(batch_iterator)
ValueError: too many values to unpack (expected 2)

Does anybody know how to overcome this error ?

How to train with custom dataset by using the pretrained model?

Hello,
I would like to ask a few questions about this github repo.

  1. What do I need to do to train using the pretrained model?
  2. How can I create my own custom dataset other than Wider-Face? Is there an annotation tool you recommend that does annotation in the same format?
  3. What should I do to train with the dataset I created?
  4. How can I convert the model to onnx after training?

论文讨论

问题:
1. 论文与工程实现不一致。

How to control proportion between negative and positive samples during training?

I am trying to perform a fine-tune and would like to be able to control the proportion between negative and positive anchors that are passed to the prednet.

I see that Pytorch implementation for Faster R-CNN have a hyper param for that:
https://github.com/pytorch/vision/blob/main/torchvision/models/detection/faster_rcnn.py#L116

I would expect it to be here in Mogface:
https://github.com/damo-cv/MogFace/blob/master/modelling/architectures/widerface_basenet.py#L74

But I found this "if else" statement with same code for both logic branches, so I assume it was removed.
Is it true, it was removed? Or is it elsewhere?

Thanks in advance for anyone that can help me

问题讨论

问题:
1. 论文与工程实现不一致,论文明显有随意编造的部分,与工程差异非常大。
2. 工程实现结果与论文不一致,差异很大
3.简单的问题为什么在论文中复杂化,虚构化?

mask_fp_context_ft[tmp_shift] = 1,IndexError: index 5 is out of bounds for dimension 2 with size 5

Thank you for sharing this project. I always encounter similar mistakes, can you help me to see the reason?

【cpu environment,python 3.6.7,torch 1.10.2】
Load model from ./model_70000.pth
Finish load model.
img-id1-object-1.png
width: 327, height: 314
C:/Users//Downloads/MogFace-master/aa.py:53: UserWarning: volatile was removed and now has no effect. Use with torch.no_grad(): instead.
x = Variable(x, volatile=True)
C:\my_dir*\venv\lib\site-packages\torch\nn\functional.py:3509: UserWarning: nn.functional.upsample is deprecated. Use nn.functional.interpolate instead.
warnings.warn("nn.functional.upsample is deprecated. Use nn.functional.interpolate instead.")
C:\my_dir*\venv\lib\site-packages\torch\nn\functional.py:3635: UserWarning: Default upsampling behavior when mode=bilinear is changed to align_corners=False since 0.4.0. Please specify align_corners=True if the old behavior is desired. See the documentation of nn.Upsample for details.
"See the documentation of nn.Upsample for details.".format(mode)
C:\my_dir*\venv\lib\site-packages\torch\nn\functional.py:1806: UserWarning: nn.functional.sigmoid is deprecated. Use torch.sigmoid instead.
warnings.warn("nn.functional.sigmoid is deprecated. Use torch.sigmoid instead.")
pyramid_feature_list: 6
Traceback (most recent call last):
File "C:/Users/
/Downloads/MogFace-master/aa.py", line 237, in
boxes = process_img(img, net, generate_anchors_fn, normalize_setting)
File "C:/Users/
/Downloads/MogFace-master/aa.py", line 152, in process_img
boxes = detect_face(net, img, shrink, generate_anchors_fn) # origin test
File "C:/Users/
/Downloads/MogFace-master/aa.py", line 55, in detect_face
out = net(x)
File "C:\my_dir*\venv\lib\site-packages\torch\nn\modules\module.py", line 1102, in _call_impl
return forward_call(*input, **kwargs)
File "C:\Users*\Downloads\MogFace-master\modelling\architectures\widerface_basenet.py", line 83, in forward
conf, loc, mask_fp_context_fts = self.pred_net(pyramid_feature_list)
File "C:\my_dir*\venv\lib\site-packages\torch\nn\modules\module.py", line 1102, in _call_impl
return forward_call(*input, **kwargs)
File "C:\Users*\Downloads\MogFace-master\modelling\pred_modules\pred_net.py", line 267, in forward
mask_fp_context_ft[tmp_shift] = 1
IndexError: index 5 is out of bounds for dimension 2 with size 5
Process finished with exit code 1

【gpu environment,python 3.7.13,torch 1.10.0+cu111】
Load model from ./model_70000.pth
Finish load model.
face_wujian.jpg
width: 500, height: 500
/root/code//MogFace-master/aa.py:54: UserWarning: volatile was removed and now has no effect. Use with torch.no_grad(): instead.
x = Variable(x.cuda(), volatile=True)
/usr/local/lib/python3.7/dist-packages/torch/nn/functional.py:3509: UserWarning: nn.functional.upsample is deprecated. Use nn.functional.interpolate instead.
warnings.warn("nn.functional.upsample is deprecated. Use nn.functional.interpolate instead.")
/usr/local/lib/python3.7/dist-packages/torch/nn/functional.py:3635: UserWarning: Default upsampling behavior when mode=bilinear is changed to align_corners=False since 0.4.0. Please specify align_corners=True if the old behavior is desired. See the documentation of nn.Upsample for details.
"See the documentation of nn.Upsample for details.".format(mode)
/usr/local/lib/python3.7/dist-packages/torch/nn/functional.py:1806: UserWarning: nn.functional.sigmoid is deprecated. Use torch.sigmoid instead.
warnings.warn("nn.functional.sigmoid is deprecated. Use torch.sigmoid instead.")
Inference time : 865
The image with bbox is saved as ./tmp_img/0.13437671850930222.jpg
face_age.png
width: 1160, height: 304
Inference time : 655
The image with bbox is saved as ./tmp_img/0.6703785369022076.jpg
img_00106.png
width: 540, height: 640
Inference time : 487
The image with bbox is saved as ./tmp_img/0.9521100804886025.jpg
single_face.jpeg
width: 700, height: 720
/pytorch/aten/src/ATen/native/cuda/IndexKernel.cu:93: operator(): block: [0,0,0], thread: [6,0,0] Assertion index >= -sizes[i] && index < sizes[i] && "index out of bounds" failed.
/pytorch/aten/src/ATen/native/cuda/IndexKernel.cu:93: operator(): block: [0,0,0], thread: [10,0,0] Assertion index >= -sizes[i] && index < sizes[i] && "index out of bounds" failed.
Traceback (most recent call last):
File "/root/code/
/MogFace-master/aa.py", line 234, in
boxes = process_img(img, net, generate_anchors_fn, normalize_setting)
File "/root/code//MogFace-master/aa.py", line 153, in process_img
boxes = detect_face(net, img, shrink, generate_anchors_fn) # origin test
File "/root/code/
/MogFace-master/aa.py", line 56, in detect_face
out = net(x)
File "/usr/local/lib/python3.7/dist-packages/torch/nn/modules/module.py", line 1102, in _call_impl
return forward_call(input, **kwargs)
File "/root/code/
/MogFace-master/modelling/architectures/widerface_basenet.py", line 75, in forward
conf, loc, mask_fp_context_fts = self.pred_net(pyramid_feature_list)
File "/usr/local/lib/python3.7/dist-packages/torch/nn/modules/module.py", line 1102, in _call_impl
return forward_call(input, **kwargs)
File "/root/code/
/MogFace-master/modelling/pred_modules/pred_net.py", line 266, in forward
mask_fp_context_ft[tmp_shift] = 1
RuntimeError: CUDA error: device-side assert triggered
CUDA kernel errors might be asynchronously reported at some other API call,so the stacktrace below might be incorrect.
For debugging consider passing CUDA_LAUNCH_BLOCKING=1.
Process finished with exit code 1

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.