Giter VIP home page Giter VIP logo

face-py-faster-rcnn's People

Contributors

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

face-py-faster-rcnn's Issues

Can't clone your repository

git clone --recursive [email protected]:playerkk/face-py-faster-rcnn.git

Cloning into 'face-py-faster-rcnn'...
Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

Pre-trained data set test & misc. questions

Hi,

I followed the installation instructions and wanted to test the pre-trained data set you provided. However, when I run the python code, I get the following error:

(cv) amyrzat@ainos03:~/face-py-faster-rcnn-master/tools$  python run_face_detection_on_fddb.py --gpu=0
Traceback (most recent call last):
  File "run_face_detection_on_fddb.py", line 4, in <module>
    from fast_rcnn.test import im_detect
  File "/home/amyrzat/face-py-faster-rcnn-master/tools/../lib/fast_rcnn/test.py", line 17, in <module>
    from fast_rcnn.nms_wrapper import nms
  File "/home/amyrzat/face-py-faster-rcnn-master/tools/../lib/fast_rcnn/nms_wrapper.py", line 9, in <module>
    from nms.gpu_nms import gpu_nms
ImportError: No module named gpu_nms

Also, on Friday I deleted the repository and tried to re download it again with the command you provided, but I got the following error:

git clone --recursive [email protected]:playerkk/face-py-faster-rcnn.git
Cloning into 'face-py-faster-rcnn'...
Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

When I downloaded your repository couple weeks ago, the command worked, but now it doesn't.

Also, I realized that in the file run_face_detection_on_fddb.py you are using FDDB to test the data, but your Readme file doesn't instruct to download it.

I am new to this, so if there is anything I am missing, please let me know.

Thank you in advance.

AttributeError: 'ProposalLayer' object has no attribute 'param_str'

Hello,

Traceback (most recent call last):
File "./tools/train_net.py", line 114, in
max_iters=args.max_iters)
File "/home/wangyj/face-py-faster-rcnn/tools/../lib/fast_rcnn/train.py", line 157, in train_net
pretrained_model=pretrained_model)
File "/home/wangyj/face-py-faster-rcnn/tools/../lib/fast_rcnn/train.py", line 43, in init
self.solver = caffe.SGDSolver(solver_prototxt)
File "/home/wangyj/face-py-faster-rcnn/tools/../lib/rpn/proposal_layer.py", line 26, in setup
layer_params = yaml.load(self.param_str)
AttributeError: 'ProposalLayer' object has no attribute 'param_str'

I just followed your step and met this problem, I have totally no idea as I met this here but I didn't met when I run faster-rcnn

datasets.inria in face.py?

Hi playerkk,

I find the following lines in face.py. However, I can't find how 'inria' functions. Is there anything that I missed?

Thank you in advance.

if name == 'main':
d = datasets.inria('train', '')
res = d.roidb

Tried to use pre-trained model

Hi
I downloaded your pre-trained model from here http://supermoe.cs.umass.edu/%7Ehzjiang/data/vgg16_faster_rcnn_iter_80000.caffemodel, put it in ./output/faster_rcnn_end2end/train, but when i tried to test it with python ./tools/run_face_detection_on_fddb.py --gpu=0, i got F0608 12:23:41.287101 5245 cudnn_conv_layer.cpp:52] Check failed: error == cudaSuccess (30 vs. 0) unknown error *** Check failure stack trace: ***.

Best regards

protobuf version problem

I run the experiment, but i got this error
faster_rcnn_end2end.yml
Traceback (most recent call last):
File "./tools/train_net.py", line 15, in
from fast_rcnn.train import get_training_roidb, train_net
File "/home/lxt/study/face-py-faster-rcnn/tools/../lib/fast_rcnn/train.py", line 10, in
import caffe
File "/home/lxt/study/face-py-faster-rcnn/tools/../caffe-fast-rcnn/python/caffe/init.py", line 1, in
from .pycaffe import Net, SGDSolver, NesterovSolver, AdaGradSolver, RMSPropSolver, AdaDeltaSolver, AdamSolver
File "/home/lxt/study/face-py-faster-rcnn/tools/../caffe-fast-rcnn/python/caffe/pycaffe.py", line 13, in
from ._caffe import Net, SGDSolver, NesterovSolver, AdaGradSolver,
ImportError: /home/lxt/study/face-py-faster-rcnn/tools/../caffe-fast-rcnn/python/caffe/../../build/lib/libcaffe.so.1.0.0-rc3: undefined symbol: _ZNK6google8protobuf7Message11GetTypeNameB5cxx11Ev

what is protobuf version of this project?

Failing to download Pre-trained Imagenet

Hello,
Unfortunately, the access to the pretrained imagenet model is no longer open. I cant download the pretrained model described in "./data/scripts/fetch_imagenet_models.sh". Is it the same one as found on ZOO (VGG16)?

Train my own data and get the Assertionerror

Hi playerkk
I follow your instructions to train the face detection and I successed. Now I'm trying to train my own data based on your work, I cancelled the cache and output dirs, and make my own data as same as wider face you used before. But when I but when i run the command:"./experiments/scripts/faster_rcnn_end2end.sh 0 VGG16 wider",I got the errors as follows:
`+ set -e

  • export PYTHONUNBUFFERED=True
  • PYTHONUNBUFFERED=True
  • GPU_ID=0
  • NET=VGG16
  • NET_lc=vgg16
  • DATASET=wider
  • array=($@)
  • len=3
  • EXTRA_ARGS=
  • EXTRA_ARGS_SLUG=
  • case $DATASET in
  • TRAIN_IMDB=wider_train
  • TEST_IMDB=wider_test
  • PT_DIR=face
  • ITERS=80000
    ++ date +%Y-%m-%d_%H-%M-%S
  • LOG=experiments/logs/faster_rcnn_end2end_VGG16_.txt.2017-10-26_15-01-22
  • exec
    ++ tee -a experiments/logs/faster_rcnn_end2end_VGG16_.txt.2017-10-26_15-01-22
  • echo Logging output to experiments/logs/faster_rcnn_end2end_VGG16_.txt.2017-10-26_15-01-22
    Logging output to experiments/logs/faster_rcnn_end2end_VGG16_.txt.2017-10-26_15-01-22
  • ./tools/train_net.py --gpu 0 --solver models/face/VGG16/faster_rcnn_end2end/solver.prototxt --weights data/imagenet_models/VGG16.v2.caffemodel --imdb wider_train --iters 80000 --cfg experiments/cfgs/faster_rcnn_end2end.yml
    Called with args:
    Namespace(cfg_file='experiments/cfgs/faster_rcnn_end2end.yml', gpu_id=0, imdb_name='wider_train', max_iters=80000, pretrained_model='data/imagenet_models/VGG16.v2.caffemodel', randomize=False, set_cfgs=None, solver='models/face/VGG16/faster_rcnn_end2end/solver.prototxt')
    Using config:
    {'DATA_DIR': '/home/manning/FRCN_MONKEY_NEW/data',
    'DEDUP_BOXES': 0.0625,
    'EPS': 1e-14,
    'EXP_DIR': 'faster_rcnn_end2end',
    'GPU_ID': 0,
    'MATLAB': 'matlab',
    'MODELS_DIR': '/home/manning/FRCN_MONKEY_NEW/models/pascal_voc',
    'PIXEL_MEANS': array([[[ 102.9801, 115.9465, 122.7717]]]),
    'RNG_SEED': 3,
    'ROOT_DIR': '/home/manning/FRCN_MONKEY_NEW',
    'TEST': {'BBOX_REG': True,
    'HAS_RPN': True,
    'MAX_SIZE': 1000,
    'NMS': 0.3,
    'PROPOSAL_METHOD': 'selective_search',
    'RPN_MIN_SIZE': 3,
    'RPN_NMS_THRESH': 0.7,
    'RPN_POST_NMS_TOP_N': 300,
    'RPN_PRE_NMS_TOP_N': 6000,
    'SCALES': [600],
    'SVM': False},
    'TRAIN': {'ASPECT_GROUPING': True,
    'BATCH_SIZE': 64,
    'BBOX_INSIDE_WEIGHTS': [1.0, 1.0, 1.0, 1.0],
    'BBOX_NORMALIZE_MEANS': [0.0, 0.0, 0.0, 0.0],
    'BBOX_NORMALIZE_STDS': [0.1, 0.1, 0.2, 0.2],
    'BBOX_NORMALIZE_TARGETS': True,
    'BBOX_NORMALIZE_TARGETS_PRECOMPUTED': True,
    'BBOX_REG': True,
    'BBOX_THRESH': 0.5,
    'BG_THRESH_HI': 0.5,
    'BG_THRESH_LO': -0.1,
    'FG_FRACTION': 0.4,
    'FG_THRESH': 0.5,
    'HAS_RPN': True,
    'IMS_PER_BATCH': 1,
    'MAX_SIZE': 1024,
    'PROPOSAL_METHOD': 'gt',
    'RPN_BATCHSIZE': 256,
    'RPN_BBOX_INSIDE_WEIGHTS': [1.0, 1.0, 1.0, 1.0],
    'RPN_CLOBBER_POSITIVES': False,
    'RPN_FG_FRACTION': 0.5,
    'RPN_MIN_SIZE': 3,
    'RPN_NEGATIVE_OVERLAP': 0.3,
    'RPN_NMS_THRESH': 0.7,
    'RPN_POSITIVE_OVERLAP': 0.7,
    'RPN_POSITIVE_WEIGHT': -1.0,
    'RPN_POST_NMS_TOP_N': 2000,
    'RPN_PRE_NMS_TOP_N': 12000,
    'SCALES': [1024],
    'SNAPSHOT_INFIX': '',
    'SNAPSHOT_ITERS': 5000,
    'USE_FLIPPED': True,
    'USE_PREFETCH': False},
    'USE_GPU_NMS': True}
    Traceback (most recent call last):
    File "./tools/train_net.py", line 106, in
    imdb, roidb = combined_roidb(args.imdb_name)
    File "./tools/train_net.py", line 71, in combined_roidb
    roidbs = [get_roidb(s) for s in imdb_names.split('+')]
    File "./tools/train_net.py", line 64, in get_roidb
    imdb = get_imdb(imdb_name)
    File "/home/manning/FRCN_MONKEY_NEW/tools/../lib/datasets/factory.py", line 52, in get_imdb
    return __setsname
    File "/home/manning/FRCN_MONKEY_NEW/tools/../lib/datasets/factory.py", line 40, in
    __sets[name] = (lambda split=split: face(split, 0, wider_devkit_path))
    File "/home/manning/FRCN_MONKEY_NEW/tools/../lib/datasets/face.py", line 47, in init
    self._image_index, self._gt_roidb = self._load_image_set_index()
    File "/home/manning/FRCN_MONKEY_NEW/tools/../lib/datasets/face.py", line 114, in _load_image_set_index
    assert(image_ext == '.png' or image_ext == '.jpg' or image_ext == '.jpeg')
    AssertionError`
    Can you help me to fix the problem? Thanks~

Trouble running pretrained model

I'm trying to run run_face_detection_on_fddb.py on the pretrained data, but when I do I get the following output:

WARNING: Logging before InitGoogleLogging() is written to STDERR
E0728 13:46:41.799814 29943 common.cpp:104] Cannot create Cublas handle. Cublas won't be available.
I0728 13:46:41.807694 29943 net.cpp:49] Initializing net from parameters:
name: "VGG_ILSVRC_16_layers"
input: "data"
input: "im_info"
state {
phase: TEST
}
input_shape {
dim: 1
dim: 3
dim: 224
dim: 224
}
input_shape {
dim: 1
dim: 3
}
layer {
name: "conv1_1"
type: "Convolution"
bottom: "data"
top: "conv1_1"
param {
lr_mult: 0
decay_mult: 0
}
param {
lr_mult: 0
decay_mult: 0
}
convolution_param {
num_output: 64
pad: 1
kernel_size: 3
}
}
layer {
name: "relu1_1"
type: "ReLU"
bottom: "conv1_1"
top: "conv1_1"
}
layer {
name: "conv1_2"
type: "Convolution"
bottom: "conv1_1"
top: "conv1_2"
param {
lr_mult: 0
decay_mult: 0
}
param {
lr_mult: 0
decay_mult: 0
}
convolution_param {
num_output: 64
pad: 1
kernel_size: 3
}
}
layer {
name: "relu1_2"
type: "ReLU"
bottom: "conv1_2"
top: "conv1_2"
}
layer {
name: "pool1"
type: "Pooling"
bottom: "conv1_2"
top: "pool1"
pooling_param {
pool: MAX
kernel_size: 2
stride: 2
}
}
layer {
name: "conv2_1"
type: "Convolution"
bottom: "pool1"
top: "conv2_1"
param {
lr_mult: 0
decay_mult: 0
}
param {
lr_mult: 0
decay_mult: 0
}
convolution_param {
num_output: 128
pad: 1
kernel_size: 3
}
}
layer {
name: "relu2_1"
type: "ReLU"
bottom: "conv2_1"
top: "conv2_1"
}
layer {
name: "conv2_2"
type: "Convolution"
bottom: "conv2_1"
top: "conv2_2"
param {
lr_mult: 0
decay_mult: 0
}
param {
lr_mult: 0
decay_mult: 0
}
convolution_param {
num_output: 128
pad: 1
kernel_size: 3
}
}
layer {
name: "relu2_2"
type: "ReLU"
bottom: "conv2_2"
top: "conv2_2"
}
layer {
name: "pool2"
type: "Pooling"
bottom: "conv2_2"
top: "pool2"
pooling_param {
pool: MAX
kernel_size: 2
stride: 2
}
}
layer {
name: "conv3_1"
type: "Convolution"
bottom: "pool2"
top: "conv3_1"
param {
lr_mult: 1
decay_mult: 1
}
param {
lr_mult: 2
decay_mult: 0
}
convolution_param {
num_output: 256
pad: 1
kernel_size: 3
}
}
layer {
name: "relu3_1"
type: "ReLU"
bottom: "conv3_1"
top: "conv3_1"
}
layer {
name: "conv3_2"
type: "Convolution"
bottom: "conv3_1"
top: "conv3_2"
param {
lr_mult: 1
decay_mult: 1
}
param {
lr_mult: 2
decay_mult: 0
}
convolution_param {
num_output: 256
pad: 1
kernel_size: 3
}
}
layer {
name: "relu3_2"
type: "ReLU"
bottom: "conv3_2"
top: "conv3_2"
}
layer {
name: "conv3_3"
type: "Convolution"
bottom: "conv3_2"
top: "conv3_3"
param {
lr_mult: 1
decay_mult: 1
}
param {
lr_mult: 2
decay_mult: 0
}
convolution_param {
num_output: 256
pad: 1
kernel_size: 3
}
}
layer {
name: "relu3_3"
type: "ReLU"
bottom: "conv3_3"
top: "conv3_3"
}
layer {
name: "pool3"
type: "Pooling"
bottom: "conv3_3"
top: "pool3"
pooling_param {
pool: MAX
kernel_size: 2
stride: 2
}
}
layer {
name: "conv4_1"
type: "Convolution"
bottom: "pool3"
top: "conv4_1"
param {
lr_mult: 1
decay_mult: 1
}
param {
lr_mult: 2
decay_mult: 0
}
convolution_param {
num_output: 512
pad: 1
kernel_size: 3
}
}
layer {
name: "relu4_1"
type: "ReLU"
bottom: "conv4_1"
top: "conv4_1"
}
layer {
name: "conv4_2"
type: "Convolution"
bottom: "conv4_1"
top: "conv4_2"
param {
lr_mult: 1
decay_mult: 1
}
param {
lr_mult: 2
decay_mult: 0
}
convolution_param {
num_output: 512
pad: 1
kernel_size: 3
}
}
layer {
name: "relu4_2"
type: "ReLU"
bottom: "conv4_2"
top: "conv4_2"
}
layer {
name: "conv4_3"
type: "Convolution"
bottom: "conv4_2"
top: "conv4_3"
param {
lr_mult: 1
decay_mult: 1
}
param {
lr_mult: 2
decay_mult: 0
}
convolution_param {
num_output: 512
pad: 1
kernel_size: 3
}
}
layer {
name: "relu4_3"
type: "ReLU"
bottom: "conv4_3"
top: "conv4_3"
}
layer {
name: "pool4"
type: "Pooling"
bottom: "conv4_3"
top: "pool4"
pooling_param {
pool: MAX
kernel_size: 2
stride: 2
}
}
layer {
name: "conv5_1"
type: "Convolution"
bottom: "pool4"
top: "conv5_1"
param {
lr_mult: 1
decay_mult: 1
}
param {
lr_mult: 2
decay_mult: 0
}
convolution_param {
num_output: 512
pad: 1
kernel_size: 3
}
}
layer {
name: "relu5_1"
type: "ReLU"
bottom: "conv5_1"
top: "conv5_1"
}
layer {
name: "conv5_2"
type: "Convolution"
bottom: "conv5_1"
top: "conv5_2"
param {
lr_mult: 1
decay_mult: 1
}
param {
lr_mult: 2
decay_mult: 0
}
convolution_param {
num_output: 512
pad: 1
kernel_size: 3
}
}
layer {
name: "relu5_2"
type: "ReLU"
bottom: "conv5_2"
top: "conv5_2"
}
layer {
name: "conv5_3"
type: "Convolution"
bottom: "conv5_2"
top: "conv5_3"
param {
lr_mult: 1
decay_mult: 1
}
param {
lr_mult: 2
decay_mult: 0
}
convolution_param {
num_output: 512
pad: 1
kernel_size: 3
}
}
layer {
name: "relu5_3"
type: "ReLU"
bottom: "conv5_3"
top: "conv5_3"
}
layer {
name: "rpn_conv/3x3"
type: "Convolution"
bottom: "conv5_3"
top: "rpn/output"
param {
lr_mult: 1
decay_mult: 1
}
param {
lr_mult: 2
decay_mult: 0
}
convolution_param {
num_output: 512
pad: 1
kernel_size: 3
stride: 1
weight_filler {
type: "gaussian"
std: 0.01
}
bias_filler {
type: "constant"
value: 0
}
}
}
layer {
name: "rpn_relu/3x3"
type: "ReLU"
bottom: "rpn/output"
top: "rpn/output"
}
layer {
name: "rpn_cls_score"
type: "Convolution"
bottom: "rpn/output"
top: "rpn_cls_score"
param {
lr_mult: 1
decay_mult: 1
}
param {
lr_mult: 2
decay_mult: 0
}
convolution_param {
num_output: 18
pad: 0
kernel_size: 1
stride: 1
weight_filler {
type: "gaussian"
std: 0.01
}
bias_filler {
type: "constant"
value: 0
}
}
}
layer {
name: "rpn_bbox_pred"
type: "Convolution"
bottom: "rpn/output"
top: "rpn_bbox_pred"
param {
lr_mult: 1
decay_mult: 1
}
param {
lr_mult: 2
decay_mult: 0
}
convolution_param {
num_output: 36
pad: 0
kernel_size: 1
stride: 1
weight_filler {
type: "gaussian"
std: 0.01
}
bias_filler {
type: "constant"
value: 0
}
}
}
layer {
name: "rpn_cls_score_reshape"
type: "Reshape"
bottom: "rpn_cls_score"
top: "rpn_cls_score_reshape"
reshape_param {
shape {
dim: 0
dim: 2
dim: -1
dim: 0
}
}
}
layer {
name: "rpn_cls_prob"
type: "Softmax"
bottom: "rpn_cls_score_reshape"
top: "rpn_cls_prob"
}
layer {
name: "rpn_cls_prob_reshape"
type: "Reshape"
bottom: "rpn_cls_prob"
top: "rpn_cls_prob_reshape"
reshape_param {
shape {
dim: 0
dim: 18
dim: -1
dim: 0
}
}
}
layer {
name: "proposal"
type: "Python"
bottom: "rpn_cls_prob_reshape"
bottom: "rpn_bbox_pred"
bottom: "im_info"
top: "rois"
python_param {
module: "rpn.proposal_layer"
layer: "ProposalLayer"
param_str: "'feat_stride': 16"
}
}
layer {
name: "roi_pool5"
type: "ROIPooling"
bottom: "conv5_3"
bottom: "rois"
top: "pool5"
roi_pooling_param {
pooled_h: 7
pooled_w: 7
spatial_scale: 0.0625
}
}
layer {
name: "fc6"
type: "InnerProduct"
bottom: "pool5"
top: "fc6"
param {
lr_mult: 1
decay_mult: 1
}
param {
lr_mult: 2
decay_mult: 0
}
inner_product_param {
num_output: 4096
}
}
layer {
name: "relu6"
type: "ReLU"
bottom: "fc6"
top: "fc6"
}
layer {
name: "drop6"
type: "Dropout"
bottom: "fc6"
top: "fc6"
dropout_param {
dropout_ratio: 0.5
}
}
layer {
name: "fc7"
type: "InnerProduct"
bottom: "fc6"
top: "fc7"
param {
lr_mult: 1
decay_mult: 1
}
param {
lr_mult: 2
decay_mult: 0
}
inner_product_param {
num_output: 4096
}
}
layer {
name: "relu7"
type: "ReLU"
bottom: "fc7"
top: "fc7"
}
layer {
name: "drop7"
type: "Dropout"
bottom: "fc7"
top: "fc7"
dropout_param {
dropout_ratio: 0.5
}
}
layer {
name: "cls_score"
type: "InnerProduct"
bottom: "fc7"
top: "cls_score"
param {
lr_mult: 1
decay_mult: 1
}
param {
lr_mult: 2
decay_mult: 0
}
inner_product_param {
num_output: 2
weight_filler {
type: "gaussian"
std: 0.01
}
bias_filler {
type: "constant"
value: 0
}
}
}
layer {
name: "bbox_pred"
type: "InnerProduct"
bottom: "fc7"
top: "bbox_pred"
param {
lr_mult: 1
decay_mult: 1
}
param {
lr_mult: 2
decay_mult: 0
}
inner_product_param {
num_output: 8
weight_filler {
type: "gaussian"
std: 0.001
}
bias_filler {
type: "constant"
value: 0
}
}
}
layer {
name: "cls_prob"
type: "Softmax"
bottom: "cls_score"
top: "cls_prob"
}
I0728 13:46:41.807978 29943 net.cpp:413] Input 0 -> data
F0728 13:46:41.820989 29943 syncedmem.hpp:18] Check failed: error == cudaSuccess (30 vs. 0) unknown error
*** Check failure stack trace: ***
Aborted (core dumped)

about the wider face data

hi
I follow your guide to start this project. I download the data WIDER face.but when i run the command:"No dataset given" , i find that the faster_rcnn_end2end.sh scripts only support only voc and coco data. and then i try to convert the wider face data to the voc style . but i meet a new question:assert (boxes[:, 2] >= boxes[:, 0]).all() .i try all i can do ,but it does not work.

自己训练的模型测试时候出错

用你的代码训练好模型后,测试的时候出现了这个问题,对比了py-faster-rcnn实在找不出问题所在,请问您知道该怎么解决这问题吗?感激不尽!!!
F1117 21:54:04.586999 26476 roi_pooling_layer.cu:87] Check failed: error == cudaSuccess (9 vs. 0) invalid configuration argument

数据集格式问题

@playerkk
您在使用wider数据集训练时,发现对标签数据进行了简单修改.即,没有使用官方提供的wider_face_train_bbx_gt.txt,而是自己定义了一个wider_face_train_annot.txt

这么做的原因是什么呢??

Nan loss and Some important things for training

When I run this repo,I got this issue
/home/lxt/study/face-py-faster-rcnn/tools/../lib/fast_rcnn/bbox_transform.py:50: RuntimeWarning: overflow encountered in exp
pred_w = np.exp(dw) * widths[:, np.newaxis]
/home/lxt/study/face-py-faster-rcnn/tools/../lib/fast_rcnn/bbox_transform.py:51: RuntimeWarning: overflow encountered in exp
pred_h = np.exp(dh) * heights[:, np.newaxis]
I0603 15:44:13.525365 30407 solver.cpp:218] Iteration 20 (2.86135 iter/s, 6.98971s/20 iters), loss = nan
I0603 15:44:13.525403 30407 solver.cpp:237] Train net output #0: accuracy = 1
I0603 15:44:13.525410 30407 solver.cpp:237] Train net output #1: loss_bbox = nan (* 1 = nan loss)
I0603 15:44:13.525416 30407 solver.cpp:237] Train net output #2: loss_cls = 87.3365 (* 1 = 87.3365 loss)
I0603 15:44:13.525421 30407 solver.cpp:237] Train net output #3: rpn_cls_loss = 0.683836 (* 1 = 0.683836 loss)
I0603 15:44:13.525427 30407 solver.cpp:237] Train net output #4: rpn_loss_bbox = 0.0186136 (* 1 = 0.0186136 loss)
I0603 15:44:13.525432 30407 sgd_solver.cpp:105] Iteration 20, lr = 0.001
I0603 15:44:20.724417 30407 solver.cpp:218] Iteration 40 (2.77823 iter/s, 7.19884s/20 iters), loss = nan

download the file

why I can't download the WIDER annotation file through the given link?

Overflow encountered in exp from bbox_transform.py

I followed all the instruction, the only thing that I changed was the caffe version (since I am using cuda 8.0 cudnn 5).
when I train the network,it broken down after print one log:

I1130 15:33:11.263000 990 solver.cpp:218] Iteration 0 (0 iter/s, 2.04132s/20 iters), loss = 3.34715
I1130 15:33:11.263075 990 solver.cpp:237] Train net output #0: accuracy = 0.515625
I1130 15:33:11.263094 990 solver.cpp:237] Train net output #1: loss_bbox = 0.0558917 (* 1 = 0.0558917 loss)
I1130 15:33:11.263106 990 solver.cpp:237] Train net output #2: loss_cls = 0.895517 (* 1 = 0.895517 loss)
I1130 15:33:11.263116 990 solver.cpp:237] Train net output #3: rpn_cls_loss = 0.709608 (* 1 = 0.709608 loss)
I1130 15:33:11.263128 990 solver.cpp:237] Train net output #4: rpn_loss_bbox = 1.69873 (* 1 = 1.69873 loss)
I1130 15:33:11.263144 990 sgd_solver.cpp:105] Iteration 0, lr = 0.001
/opt/caffe/tools/../lib/fast_rcnn/bbox_transform.py:48: RuntimeWarning: overflow encountered in exp
pred_w = np.exp(dw) * widths[:, np.newaxis]
/opt/caffe/tools/../lib/fast_rcnn/bbox_transform.py:49: RuntimeWarning: overflow encountered in exp
pred_h = np.exp(dh) * heights[:, np.newaxis]
/opt/caffe/tools/../lib/rpn/proposal_layer.py:175: RuntimeWarning: invalid value encountered in greater_equal
keep = np.where((ws >= min_size) & (hs >= min_size))[0]
I1130 15:33:24.214957 990 solver.cpp:218] Iteration 20 (1.54418 iter/s, 12.9518s/20 iters), loss = nan
I1130 15:33:24.215034 990 solver.cpp:237] Train net output #0: accuracy = 1
I1130 15:33:24.215051 990 solver.cpp:237] Train net output #1: loss_bbox = nan (* 1 = nan loss)
I1130 15:33:24.215062 990 solver.cpp:237] Train net output #2: loss_cls = 87.3365 (* 1 = 87.3365 loss)
I1130 15:33:24.215075 990 solver.cpp:237] Train net output #3: rpn_cls_loss = 87.3365 (* 1 = 87.3365 loss)
I1130 15:33:24.215085 990 solver.cpp:237] Train net output #4: rpn_loss_bbox = nan (* 1 = nan loss)
I1130 15:33:24.215096 990 sgd_solver.cpp:105] Iteration 20, lr = 0.001

Evaluation of accuracy

hi playerkk
I'm sorry to bother you again. after about two day training. i get the vgg16_faster_rcnn_iter_80000.caffemodel. and then I run
python ./tools/run_face_detection_on_fddb.py --gpu=0
after that the screen display the number such:1 3.448 6.897 10.345 ..... and then I check the code: run_face_detection_on_fddb.py
I find this : sys.stdout.write('%.3f ' % ((idx + 1) / len(image_names) * 100)).
In addition to that. I want to know how do you evaluat the accuracy. after that : scores, boxes = im_detect(net, im) . we will get the scores, boxes .
But I was confused for the next code:
` cls_ind = 1
cls_boxes = boxes[:, 4cls_ind:4(cls_ind + 1)]
cls_scores = scores[:, cls_ind]
dets = np.hstack((cls_boxes,
cls_scores[:, np.newaxis])).astype(np.float32)
keep = nms(dets, NMS_THRESH)
dets = dets[keep, :]

  keep = np.where(dets[:, 4] > CONF_THRESH)
  dets = dets[keep]

  # vis_detections(im, 'face', dets, CONF_THRESH)

  dets[:, 2] = dets[:, 2] - dets[:, 0] + 1
  dets[:, 3] = dets[:, 3] - dets[:, 1] + 1`

Thanks in advance. hope your reply.

Also about Evaluation

Hi, @playerkk . Thank you for your wonderful shared code! Now I have trained a model using data WIDER, but when I run your code for test_net, the problem of "global name 'datasets' is not defined" confused me, which points at the 412th line in file "/lib/datasets/face.py". Can you tell me how to deal with it?
Additionally, how is the accuracy calculated in the training process?
Thank you very much!

about WIDER/FDDB

@playerkk HI

有2个问题想请教:
1.
在使用wider数据集训练时,发现您对标签数据进行了简单修改.即,没有使用官方提供的wider_face_train_bbx_gt.txt,而是自己定义了一个wider_face_train_annot.txt
这么做的原因是什么呢??

FDDB数据集测试时,您得到的结果形式是:
191.090973 67.139038 156.147095 207.192780 0.999891
对应的是rectangle box
但实际标签中是ellipse box,形式为:
123.583300 85.549500 1.265839 269.693400 161.781200 1

在FDDB数据进行检测时,需要的也是ellipse box.请问您是如何将检测结果中的rectangle box转为ellipse box的??

麻烦了!!

The loss in my training is not converge

Hi, i am a new guy here. i want to reproduce the training, and i follow the step in ReadMe. but after 80000 iters, the loss of fast-rcnn and rpn looks like not converge, i draw loss curve. is anything wrong with my training? what normal loss curve should be, can anybody help me? thanks.

loss_bbox:
图片

loss_cls:
图片

Could not understand the result

after I run the python ./tools/run_face_detection_on_fddb.py --gpu=0 to test the model

the output is like
1 3.448 6.897 10.345 13.793 17.241 20.690 24.138 27.586 31.034 34.483 37.931 41.379 44.828 48.276 51.724 55.172 58.621 62.069 65.517 68.966 72.414 75.862 79.310 82.759 86.207 89.655 93.103 96.552 100.000
2 3.509 7.018 10.526 14.035 17.544 21.053 24.561 28.070 31.579 35.088 38.596 42.105 45.614 49.123 52.632 56.140 59.649 63.158 66.667 70.175 73.684 77.193 80.702 84.211 87.719 91.228 94.737 98.246
3 3.650 7.299 10.949 14.599 18.248 21.898 25.547 29.197 32.847 36.496 40.146 43.796 47.445 51.095 54.745 58.394 62.044 65.693 69.343 72.993 76.642 80.292 83.942 87.591 91.241 94.891 98.540
4 3.311 6.623 9.934 13.245 16.556 19.868 23.179 26.490 29.801 33.113 36.424 39.735 43.046 46.358 49.669 52.980 56.291 59.603 62.914 66.225 69.536 72.848 76.159 79.470 82.781 86.093 89.404 92.715 96.026 99.338
5 3.356 6.711 10.067 13.423 16.779 20.134 23.490 26.846 30.201 33.557 36.913 40.268 43.624 46.980 50.336 53.691 57.047 60.403 63.758 67.114 70.470 73.826 77.181 80.537 83.893 87.248 90.604 93.960 97.315
6 3.311 6.623 9.934 13.245 16.556 19.868 23.179 26.490 29.801 33.113 36.424 39.735 43.046 46.358 49.669 52.980 56.291 59.603 62.914 66.225 69.536 72.848 76.159 79.470 82.781 86.093 89.404 92.715 96.026 99.338
7 3.584 7.168 10.753 14.337 17.921 21.505 25.090 28.674 32.258 35.842 39.427 43.011 46.595 50.179 53.763 57.348 60.932 64.516 68.100 71.685 75.269 78.853 82.437 86.022 89.606 93.190 96.774
8 3.623 7.246 10.870 14.493 18.116 21.739 25.362 28.986 32.609 36.232 39.855 43.478 47.101 50.725 54.348 57.971 61.594 65.217 68.841 72.464 76.087 79.710 83.333 86.957 90.580 94.203 97.826
9 3.861 7.722 11.583 15.444 19.305 23.166 27.027 30.888 34.749 38.610 42.471 46.332 50.193 54.054 57.915 61.776 65.637 69.498 73.359 77.220 81.081 84.942 88.803 92.664 96.525
10 3.571 7.143 10.714 14.286 17.857 21.429 25.000 28.571 32.143 35.714 39.286 42.857 46.429 50.000 53.571 57.143 60.714 64.286 67.857 71.429 75.000 78.571 82.143 85.714 89.286 92.857 96.429 100.000

But I can not understand it and I didn't find some information about it in readme...excuse me for being stupid but could anyone help me with understanding it?

how to use the pre-trained model?

Hi playerkk,
I'm new to the face detection with faster-rcnn, here is my question:
I have downloaded your pre-trained model "vgg16-faster-rcnn-iter-80000.caffemodel", but I don't know how to use it to test my own images. In the py-faster-rcnn, I can use the demo.py to test my images, but in your project, I don't know how to change it. Could you help me?
Thank you in advance.

./tools/run_face_detection_on_fddb.py fails

Hi,
when I try to run "python ./tools/run_face_detection_on_fddb.py" I get this error:

Loaded network output/faster_rcnn_end2end/train/vgg16_faster_rcnn_iter_80000.caffemodel
1 Traceback (most recent call last):
File "./tools/run_face_detection_on_fddb.py", line 146, in
scores, boxes = im_detect(net, im)
File "/home/emely/face-py-faster-rcnn/tools/../lib/fast_rcnn/test.py", line 121, in im_detect
blobs, im_scales = _get_blobs(im, boxes)
File "/home/emely/face-py-faster-rcnn/tools/../lib/fast_rcnn/test.py", line 103, in _get_blobs
blobs['data'], im_scale_factors = _get_image_blob(im)
File "/home/emely/face-py-faster-rcnn/tools/../lib/fast_rcnn/test.py", line 33, in _get_image_blob
im_orig = im.astype(np.float32, copy=True)
AttributeError: 'NoneType' object has no attribute 'astype'

Can anbody help me?

What kind of fast rcnn version this repo use?

I use the version you provide in README.md , but I got this error.
I0530 00:15:09.932767 26960 solver.cpp:77] Creating training net from train_net file: models/face/VGG16/faster_rcnn_end2end/train.prototxt
[libprotobuf ERROR google/protobuf/text_format.cc:245] Error parsing text-format caffe.NetParameter: 470:24: Message type "caffe.LayerParameter" has no field named "smooth_l1_loss_param".
F0530 00:15:09.933073 26960 upgrade_proto.cpp:88] Check failed: ReadProtoFromTextFile(param_file, param) Failed to parse NetParameter file: models/face/VGG16/faster_rcnn_end2end/train.prototxt
*** Check failure stack trace: ***
it seems like fast rcnn didn't contain the smooth_l1_loss layer

提供DCVnet代码用于测试

大神,有DCVNet的源代码合预训练好的模型提供一下,拜读了一下你们写的DCVNet计算光流,想要一份代码测试一下结果,可以的话发一份到我的QQ邮箱:[email protected]

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.