Git Product home page Git Product logo

fchd-fully-convolutional-head-detector's People

Contributors

aditya-vora 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  avatar  avatar  avatar  avatar  avatar  avatar

fchd-fully-convolutional-head-detector's Issues

CUDA driver version is insufficient for CUDA runtime version

Thanks for your sharing and sorry for submit for 3 times (including 2 wrong issues)

I have installed all the dependency and changed the config.py file to the right path
However, errors ocour when I run the demo.

 Traceback (most recent call last):
  File "/home/lch/.local/lib/python2.7/site-packages/visdom/__init__.py", line 446, in _send
    data=json.dumps(msg),
  File "/home/lch/.local/lib/python2.7/site-packages/requests/api.py", line 112, in post
    return request('post', url, data=data, json=json, **kwargs)
  File "/home/lch/.local/lib/python2.7/site-packages/requests/api.py", line 58, in request
    return session.request(method=method, url=url, **kwargs)
  File "/home/lch/.local/lib/python2.7/site-packages/requests/sessions.py", line 512, in request
    resp = self.send(prep, **send_kwargs)
  File "/home/lch/.local/lib/python2.7/site-packages/requests/sessions.py", line 622, in send
    r = adapter.send(request, **kwargs)
  File "/home/lch/.local/lib/python2.7/site-packages/requests/adapters.py", line 513, in send
    raise ConnectionError(e, request=request)
ConnectionError: HTTPConnectionPool(host='localhost', port=8097): Max retries exceeded with url: /env/head_detector (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f7a57fd6dd0>: Failed to establish a new connection: [Errno 111] Connection refused',))
THCudaCheck FAIL file=/pytorch/aten/src/THC/THCGeneral.cpp line=74 error=35 : CUDA driver version is insufficient for CUDA runtime version
Traceback (most recent call last):
  File "head_detection_demo.py", line 69, in <module>
    detect(args.img_path, args.model_path)
  File "head_detection_demo.py", line 43, in detect
    trainer = Head_Detector_Trainer(head_detector).cuda()
  File "/home/lch/.local/lib/python2.7/site-packages/torch/nn/modules/module.py", line 258, in cuda
    return self._apply(lambda t: t.cuda(device))
  File "/home/lch/.local/lib/python2.7/site-packages/torch/nn/modules/module.py", line 185, in _apply
    module._apply(fn)
  File "/home/lch/.local/lib/python2.7/site-packages/torch/nn/modules/module.py", line 185, in _apply
    module._apply(fn)
  File "/home/lch/.local/lib/python2.7/site-packages/torch/nn/modules/module.py", line 185, in _apply
    module._apply(fn)
  File "/home/lch/.local/lib/python2.7/site-packages/torch/nn/modules/module.py", line 191, in _apply
    param.data = fn(param.data)
  File "/home/lch/.local/lib/python2.7/site-packages/torch/nn/modules/module.py", line 258, in <lambda>
    return self._apply(lambda t: t.cuda(device))
RuntimeError: cuda runtime error (35) : CUDA driver version is insufficient for CUDA runtime version at /pytorch/aten/src/THC/THCGeneral.cpp:74

Here is the detail of my environment:

Ubuntu 16.04
Python 2.7
PyTorch 0.4 with GPU
cupy-cuda80
CUDA Version 8.0.44
CUDNN Version 5.1.5
NVIDIA-SMI 375.82

Is there anything wrong with my environment?

Thanks

我遇到了代码问题,想请教以下为什么

Traceback (most recent call last):
File "head_detection_demo.py", line 71, in
detect(args.img_path, args.model_path)
File "head_detection_demo.py", line 43, in detect
img, img_raw, scale = read_img(img_path)
File "head_detection_demo.py", line 36, in read_img
img = preprocess(img)
File "/home/anthony/FCHD-Fully-Convolutional-Head-Detector-master/data/dataset.py", line 48, in preprocess
img = sktsf.resize(img, (C, H * scale, W * scale), mode='reflect')
File "/usr/lib/python2.7/dist-packages/skimage/transform/_warps.py", line 91, in resize
col_scale = float(orig_cols) / cols
ZeroDivisionError: float division by zero

我使用了你的模型,这是我的config.py路径设置:
brainwash_dataset_root_path = 'home/anthony/FCHD-Fully-Convolutional-Head-Detector-master/data/brainwash'
hollywood_dataset_root_path = '/home/aditya-tyco/Desktop/aditya_personal_projects/head_detection_v5/data/HollywoodHeads'
min_size = 600 # image resize
max_size = 1000 # image resize
caffe_pretrain = True
caffe_pretrain_path = '/home/anthony/FCHD-Fully-Convolutional-Head-Detector-master/data/pretrained_model/vgg16_caffe.pth'
model_save_path = '/home/anthony/FCHD-Fully-Convolutional-Head-Detector-master/checkpoints/'
test_output_path = '/home/anthony/FCHD-Fully-Convolutional-Head-Detector-master/testout/'
而且我看了所有的问题,并以作出修改

who can offer vgg16_caffe.pth?

caffe_pretrain = True
caffe_pretrain_path = '/home/aditya-tyco/Desktop/aditya_personal_projects/head_detection_v5/data/pretrained_model/vgg16_caffe.pth'

where is vgg16_caffe.pth?
who can offer vgg16_caffe.pth?

CPU version?

Does the writer set up CPU version?
And how can I train and test on CPU?

How to fine tune the model by using the best performing model

Hi aditya-vora,

First of all, excellent work! Thanks for sharing!

I would like to fine tune the model by using the best performing model based on my own dataset. I wonder if you could give me some suggestion on doing that.

Thanks for your help.

Best

'module' object has no attribute 'import_array'

When I try to build cython code using python build.py build_ext --inplace
I get the following error.
Traceback (most recent call last):
File "build.py", line 7, in
np.import_array()
AttributeError: 'module' object has no attribute 'import_array'

I am using:
python 2.7.14 h1571d57_29
Cython 0.28.5
numpy 1.14.0 py27h3dfced4_1

TypeError, when i run train.py

hello, i have trouble in training model
when i run python train.py
it seems that something wrong in trainer.py (forward function)

what the problem is and how to solve it
Thanks for helping

Traceback (most recent call last):
File "train.py", line 132, in
train()
File "train.py", line 107, in train
_, _, _ = trainer.train_step(img, bbox, scale)
File "trainer.py", line 66, in train_step
losses, rois, rois_scores = self.forward(imgs, bboxes, scale)
File "trainer.py", line 40, in forward
rpn_locs, rpn_scores, rois, rois_scores, anchor = self.head_detector.rpn(features, img_size, scale)
File "/home/zhouhongli/.conda/envs/torch-py27/lib/python2.7/site-packages/torch/nn/modules/module.py", line 489, in call
result = self.forward(*input, **kwargs)
File "src/region_proposal_network.py", line 79, in forward
scale=scale
File "src/creator_tool.py", line 135, in call
keep = np.where((hs >= min_size) & (ws >= min_size))[0]
TypeError: le() received an invalid combination of arguments - got (numpy.ndarray), but expected one of:
(Tensor other)
didn't match because some of the arguments have invalid types: (numpy.ndarray)
(Number other)
didn't match because some of the arguments have invalid types: (numpy.ndarray)

Fail to reproduce results

Was anyone able to reproduce the results advertised in pytorch ?

test
test1

I got no head detections with this. I did set caffe_pretrain to False. I tried putting some multiplications and offsets in the input tensors but never got rational results.
I'm using pytorch 0.4.0.

run demo inaccurate

I have followed the steps to run demo but I get inaccurate results. The boxes of heads are seen to be offset from their original coordinate(see the results).
Figure_1
Figure_2

Update to Python 3

It's unbelievable that this was written with Python 2 which is very much a legacy version and is due for obsolescence. Please update the code to Python 3.7. Or is this a joke project?

ReShaping problem

All my images are reshaping with white borders and i cant find what part of your code is doing this. Can you help please?
out1

pre-trainer model

can I use resnet100 as pre-trainer model??anybody had tried for it?tell me please

the problem of the Brainwash dataset

I didn`t found the dataset from the link giving in the 'Training' part. Is the dataset from Stanford Digital Repository? I found this data was removed from access at the request of the depositor.

ConnectionRefusedError

Dear author, I met a problem when I run the head_detection_demo. Here is the error:

the python code for non_maximum_suppression is about 2x slow
It is strongly recommended to build cython code:
cd model/utils/nms/; python3 build.py build_ext --inplace cd model/utils/nms/; python3 build.py build_ext --inplace''')
/home/sobey/.local/lib/python3.6/site-packages/skimage/transform/_warps.py:110: UserWarning: Anti-aliasing will be enabled by default in skimage 0.15 to avoid aliasing artifacts when down-sampling images.
warn("Anti-aliasing will be enabled by default in skimage 0.15 to "
WARNING:root:Setting up a new session...
Exception in user code:

Traceback (most recent call last):
File "/home/sobey/.local/lib/python3.6/site-packages/urllib3/connection.py", line 159, in _new_conn
(self._dns_host, self.port), self.timeout, **extra_kw)
File "/home/sobey/.local/lib/python3.6/site-packages/urllib3/util/connection.py", line 80, in create_connection
raise err
File "/home/sobey/.local/lib/python3.6/site-packages/urllib3/util/connection.py", line 70, in create_connection
sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused

Any idea could help, thanks a lot!

how to change the model to torch script

I had changed so many time ,but failed to change the model to torch script ,I think this is the problem of RPN network ,do U have some way to help me??
Thanks!!!

ImportError: No module named torchnet.meter

Traceback (most recent call last):
File "head_detection_demo.py", line 7, in
from trainer import Head_Detector_Trainer
File "/home/mrsy/project/head_detect/FCHD-Fully-Convolutional-Head-Detector/trainer.py", line 9, in
from torchnet.meter import ConfusionMeter, AverageValueMeter
ImportError: No module named torchnet.meter

when doing demo cuDnn error occurs

Traceback (most recent call last):
File "D:/Program/Pyproject/resources/Code/Head_Detection/FCHD-Fully-Convolutional-Head-Detector-master/head_detection_demo.py", line 69, in
detect(args.img_path, args.model_path)
File "D:/Program/Pyproject/resources/Code/Head_Detection/FCHD-Fully-Convolutional-Head-Detector-master/head_detection_demo.py", line 49, in detect
pred_bboxes_, _ = head_detector.predict(img, scale, mode='evaluate', thresh=THRESH)
File "D:\Program\Pyproject\resources\Code\Head_Detection\FCHD-Fully-Convolutional-Head-Detector-master\src\head_detector.py", line 72, in predict
_, _, rois, rois_scores, _ = self.forward(x, scale=scale)
File "D:\Program\Pyproject\resources\Code\Head_Detection\FCHD-Fully-Convolutional-Head-Detector-master\src\head_detector.py", line 25, in forward
h = self.extractor(x)
File "D:\Program\Python3.6\lib\site-packages\torch\nn\modules\module.py", line 489, in call
result = self.forward(*input, **kwargs)
File "D:\Program\Python3.6\lib\site-packages\torch\nn\modules\container.py", line 92, in forward
input = module(input).cuda()
File "D:\Program\Python3.6\lib\site-packages\torch\nn\modules\module.py", line 489, in call
result = self.forward(*input, **kwargs)
File "D:\Program\Python3.6\lib\site-packages\torch\nn\modules\conv.py", line 320, in forward
self.padding, self.dilation, self.groups).cuda()
RuntimeError: cuDNN error: CUDNN_STATUS_EXECUTION_FAILED

Process finished with exit code 1

I don't know what happen here! every thing are correct! I am using python3.6 CUDA9 vs2017community

How to Get AP of the Models

function eval in train.py doesn't look like computing this AP metric.
someone know how to get ap of own models?
thank you very much for your help

No data/pre-trained folder

As suggested for training data download VGG dataset and paste it in data/pre-trained folder but there is no such pre-trained folder in data in your repository

为什么做了pytorch的数据增强后效果反而变差了

为了提高模型的精度,我想到了如下三个办法1:做增量训练,2:改用Adam优化器,暂时还没有成功,具体报错是数据格式的问题,我稍后再尝试一下,3:做数据增强,可是模型评估的系数一直很低,所以想请教一下有什么办法提议提高模型的精确度,还有就是判断标准就就仅仅看每一个epochs后打印的那个准确值吗??在一定的epoch后选择一个最好的模型再继续往下训练会有效果吗??个人感觉会过拟合,而且评估系数只会越来越低,这又该如何解释呢。

why can't I change the invalid batch_size

when I change the invalid batch_size=128 or other number !=1,
RuntimeError: invalid argument 0: Sizes of tensors must match except in dimension 0. Got 861 and 811 in dimension 3 at /pytorch/aten/src/TH/generic/THTensorMoreMath.cpp:1307

Running train.py error FigureCanvasInterAgg' object has no attribute 'renderer'

Traceback (most recent call last):
File "E:/word_space/FCHD/FCHD-Fully-Convolutional-Head-Detector-master/train.py", line 140, in
train()
File "E:/word_space/FCHD/FCHD-Fully-Convolutional-Head-Detector-master/train.py", line 112, in train
gt_img = visdom_bbox(ori_img_, at.tonumpy(bbox_[0]))
File "E:\word_space\FCHD\FCHD-Fully-Convolutional-Head-Detector-master\src\vis_tool.py", line 194, in visdom_bbox
data = fig4vis(fig)
File "E:\word_space\FCHD\FCHD-Fully-Convolutional-Head-Detector-master\src\vis_tool.py", line 183, in fig4vis
img_data = fig2data(ax).astype(np.int32)
File "E:\word_space\FCHD\FCHD-Fully-Convolutional-Head-Detector-master\src\vis_tool.py", line 165, in fig2data
buf1 = fig.canvas.tostring_argb()
File "D:\Anaconda3\lib\site-packages\matplotlib\backends\backend_agg.py", line 479, in tostring_argb
return self.renderer.tostring_argb()
AttributeError: 'FigureCanvasInterAgg' object has no attribute 'renderer'

run demo error

oints/head_detector_final
test_image/test3.jpg
checkpoints/head_detector_final
(600.0, 789.7172236503856)
WARNING:root:Setting up a new session...
Traceback (most recent call last):
File "head_detection_demo.py", line 73, in
detect(args.img_path, args.model_path)
File "head_detection_demo.py", line 51, in detect
pred_bboxes_, _ = head_detector.predict(img, scale, mode='evaluate', thresh=THRESH)
File "/home/mrsy/project/head_detect/FCHD-Fully-Convolutional-Head-Detector/src/head_detector.py", line 72, in predict
_, _, rois, rois_scores, _ = self.forward(x, scale=scale)
File "/home/mrsy/project/head_detect/FCHD-Fully-Convolutional-Head-Detector/src/head_detector.py", line 26, in forward
rpn_locs, rpn_scores, rois, rois_scores, anchor = self.rpn(h, img_size, scale)
File "/usr/local/lib/python2.7/dist-packages/torch/nn/modules/module.py", line 477, in call
result = self.forward(*input, **kwargs)
File "/home/mrsy/project/head_detect/FCHD-Fully-Convolutional-Head-Detector/src/region_proposal_network.py", line 79, in forward
scale=scale
File "/home/mrsy/project/head_detect/FCHD-Fully-Convolutional-Head-Detector/src/creator_tool.py", line 147, in call
thresh=self.nms_thresh)
File "/home/mrsy/project/head_detect/FCHD-Fully-Convolutional-Head-Detector/src/nms/non_maximum_suppression.py", line 72, in non_maximum_suppression
return _non_maximum_suppression_gpu(bbox, thresh, score, limit)
File "/home/mrsy/project/head_detect/FCHD-Fully-Convolutional-Head-Detector/src/nms/non_maximum_suppression.py", line 84, in _non_maximum_suppression_gpu
order = cp.arange(n_bbox, dtype=np.int32)
File "/usr/local/lib/python2.7/dist-packages/cupy/creation/ranges.py", line 57, in arange
_arange_ufunc(typ(start), typ(step), ret, dtype=dtype)
File "cupy/core/_kernel.pyx", line 821, in cupy.core._kernel.ufunc.call
File "cupy/util.pyx", line 48, in cupy.util.memoize.decorator.ret
File "cupy/core/_kernel.pyx", line 612, in cupy.core._kernel._get_ufunc_kernel
File "cupy/core/_kernel.pyx", line 46, in cupy.core._kernel._get_simple_elementwise_kernel
File "cupy/core/carray.pxi", line 148, in cupy.core.core.compile_with_cache
File "/usr/local/lib/python2.7/dist-packages/cupy/cuda/compiler.py", line 164, in compile_with_cache
ptx = compile_using_nvrtc(source, options, arch)
File "/usr/local/lib/python2.7/dist-packages/cupy/cuda/compiler.py", line 82, in compile_using_nvrtc
ptx = prog.compile(options)
File "/usr/local/lib/python2.7/dist-packages/cupy/cuda/compiler.py", line 245, in compile
raise CompileException(log, self.src, self.name, options)
cupy.cuda.compiler.CompileException: /usr/local/cuda-8.0/include/cuda_fp16.h(2958): error: identifier "__float2half_rn" is undefined

/usr/local/cuda-8.0/include/cuda_fp16.h(3000): error: identifier "__float2half_rn" is undefined

/usr/local/lib/python2.7/dist-packages/cupy/core/include/cupy/carray.cuh(55): error: identifier "__half_raw" is undefined

/usr/local/lib/python2.7/dist-packages/cupy/core/include/cupy/carray.cuh(45): error: no suitable constructor exists to convert from "float" to "__half"

/usr/local/lib/python2.7/dist-packages/cupy/core/include/cupy/carray.cuh(47): error: no suitable constructor exists to convert from "float" to "__half"

/usr/local/lib/python2.7/dist-packages/cupy/core/include/cupy/carray.cuh(48): error: no suitable constructor exists to convert from "double" to "__half"

/usr/local/lib/python2.7/dist-packages/cupy/core/include/cupy/carray.cuh(49): error: no suitable constructor exists to convert from "int" to "__half"

/usr/local/lib/python2.7/dist-packages/cupy/core/include/cupy/carray.cuh(50): error: no suitable constructor exists to convert from "unsigned int" to "__half"

/usr/local/lib/python2.7/dist-packages/cupy/core/include/cupy/carray.cuh(51): error: no suitable constructor exists to convert from "long long" to "__half"

/usr/local/lib/python2.7/dist-packages/cupy/core/include/cupy/carray.cuh(52): error: no suitable constructor exists to convert from "unsigned long long" to "__half"

/usr/local/lib/python2.7/dist-packages/cupy/core/include/cupy/carray.cuh(57): error: no suitable conversion function from "const half" to "float" exists

/usr/local/lib/python2.7/dist-packages/cupy/core/include/cupy/carray.cuh(62): error: identifier "__half_raw" is undefined

/usr/local/lib/python2.7/dist-packages/cupy/core/include/cupy/carray.cuh(66): error: identifier "__half_raw" is undefined

/usr/local/lib/python2.7/dist-packages/cupy/core/include/cupy/carray.cuh(66): error: identifier "__half_raw" is undefined

/usr/local/lib/python2.7/dist-packages/cupy/core/include/cupy/carray.cuh(71): error: identifier "__half_raw" is undefined

/usr/local/lib/python2.7/dist-packages/cupy/core/include/cupy/carray.cuh(75): error: identifier "__half_raw" is undefined

/usr/local/lib/python2.7/dist-packages/cupy/core/include/cupy/carray.cuh(79): error: identifier "__half_raw" is undefined

/usr/local/lib/python2.7/dist-packages/cupy/core/include/cupy/carray.cuh(107): error: identifier "__half_raw" is undefined

/usr/local/lib/python2.7/dist-packages/cupy/core/include/cupy/carray.cuh(107): error: identifier "__half_raw" is undefined

/usr/local/lib/python2.7/dist-packages/cupy/core/include/cupy/carray.cuh(108): error: expected a ";"

/usr/local/lib/python2.7/dist-packages/cupy/core/include/cupy/carray.cuh(109): error: expected a ";"

/usr/local/lib/python2.7/dist-packages/cupy/core/include/cupy/carray.cuh(110): error: identifier "ret_raw_" is undefined

/usr/local/lib/python2.7/dist-packages/cupy/core/include/cupy/carray.cuh(110): error: identifier "y_raw_" is undefined

/usr/local/lib/python2.7/dist-packages/cupy/core/include/cupy/carray.cuh(115): error: identifier "__half_raw" is undefined

/usr/local/lib/python2.7/dist-packages/cupy/core/include/cupy/carray.cuh(115): error: identifier "__half_raw" is undefined

/usr/local/lib/python2.7/dist-packages/cupy/core/include/cupy/carray.cuh(116): error: expected a ";"

/usr/local/lib/python2.7/dist-packages/cupy/core/include/cupy/carray.cuh(117): error: expected a ";"

/usr/local/lib/python2.7/dist-packages/cupy/core/include/cupy/carray.cuh(119): error: identifier "ret_raw_" is undefined

/usr/local/lib/python2.7/dist-packages/cupy/core/include/cupy/carray.cuh(121): error: identifier "ret_raw_" is undefined

/usr/local/lib/python2.7/dist-packages/cupy/core/include/cupy/carray.cuh(123): error: identifier "ret_raw_" is undefined

/usr/local/lib/python2.7/dist-packages/cupy/core/include/cupy/carray.cuh(123): error: identifier "y_raw_" is undefined

/usr/local/lib/python2.7/dist-packages/cupy/core/include/cupy/carray.cuh(125): error: identifier "y_raw_" is undefined

/usr/local/lib/python2.7/dist-packages/cupy/core/include/cupy/carray.cuh(126): error: identifier "ret_raw_" is undefined

/usr/local/lib/python2.7/dist-packages/cupy/core/include/cupy/carray.cuh(128): error: identifier "ret_raw_" is undefined

/usr/local/lib/python2.7/dist-packages/cupy/core/include/cupy/carray.cuh(130): error: identifier "y_raw_" is undefined

/usr/local/lib/python2.7/dist-packages/cupy/core/include/cupy/carray.cuh(131): error: identifier "ret_raw_" is undefined

/usr/local/lib/python2.7/dist-packages/cupy/core/include/cupy/carray.cuh(133): error: identifier "ret_raw_" is undefined

/usr/local/lib/python2.7/dist-packages/cupy/core/include/cupy/carray.cuh(135): error: identifier "ret_raw_" is undefined

/usr/local/lib/python2.7/dist-packages/cupy/core/include/cupy/carray.cuh(140): error: identifier "__half_raw" is undefined

/usr/local/lib/python2.7/dist-packages/cupy/core/include/cupy/carray.cuh(140): error: identifier "__half_raw" is undefined

/usr/local/lib/python2.7/dist-packages/cupy/core/include/cupy/carray.cuh(141): error: expected a ";"

/usr/local/lib/python2.7/dist-packages/cupy/core/include/cupy/carray.cuh(142): error: identifier "y_raw_" is undefined

/usr/local/lib/python2.7/dist-packages/cupy/core/include/cupy/carray.cuh(281): warning: statement is unreachable
detected during instantiation of "void CIndexer<_ndim>::set(ptrdiff_t) [with _ndim=1]"
/tmp/tmpom81Le/kern.cu(12): here

42 errors detected in the compilation of "/tmp/tmpom81Le/kern.cu".

Here is the detail of my environment:

Ubuntu 16.04
Python 2.7
PyTorch 0.41 with GPU
cupy-cuda80
CUDA Version 8.0.61

Error when running demo

When I run demo, I get error message as follows:

Traceback (most recent call last):
  File "head_detection_demo.py", line 69, in <module>
    detect(args.img_path, args.model_path)
  File "head_detection_demo.py", line 42, in detect
    head_detector = Head_Detector_VGG16(ratios=[1], anchor_scales=[2,4])
  File "/home/kxy/FCHD-Fully-Convolutional-Head-Detector/src/head_detector_vgg16.py", line 40, in __init__
    extractor = decom_vgg16()
  File "/home/kxy/FCHD-Fully-Convolutional-Head-Detector/src/head_detector_vgg16.py", line 17, in decom_vgg16
    model.load_state_dict(t.load(opt.caffe_pretrain_path))
  File "/home/kxy/anaconda3/lib/python3.6/site-packages/torch/serialization.py", line 301, in load
    f = open(f, 'rb')
FileNotFoundError: [Errno 2] No such file or directory: '/home/aditya-tyco/Desktop/aditya_personal_projects/head_detection_v5/data/pretrained_model/vgg16_caffe.pth'

When I look into head_detector_vgg16.py, I find codes like this

    if opt.caffe_pretrain:
        # Load the caffe model
        model = vgg16(pretrained=False)
        model.load_state_dict(t.load(opt.caffe_pretrain_path))
    else:
        # Load the default model in PyTorch
        model = vgg16(pretrained=True)

I think maybe something wrong when running these codes, but I don't know why.

检测结果位置往右下方偏移

00004000_640x480
检测窗口基本能对应人物头部,但是窗口位置偏移距离较远
\FCHD-Fully-Convolutional-Head-Detector\src\head_detector_demo.py:54-55:
ymin, xmin, ymax, xmax = pred_bboxes_[i,:]
utils.draw_bounding_box_on_image_array(img_raw,ymin, xmin, ymax, xmax)

Bounding Boxes displacement error

I have run "head_detection_demo.py" and I haven't received good results.
The bounding boxes seem correct but there is a kind of displacement respect to ground truth.

prova2

Hollywoods dataset

Is it necessary to download and use Hollywoods dataset?
Is it ok if i just use brainwash dataset?
Thanks

RuntimeError: CUDA error: out of memory

运行demo 的时候:
python head_detection_demo.py --img_path mov_021_178867.jpeg --model_path '/FCHD-Fully-Convolutional-Head-Detector/checkpoints/head_detector09191214_0.6141253457131631'
报错:RuntimeError: CUDA error: out of memory

Error When Running Demo

Hi
When I ran demo so it's generate error

RuntimeError: Error(s) in loading state_dict for Head_Detector_VGG16:
Missing key(s) in state_dict: "extractor.0.weight", "extractor.0.bias", "extractor.2.weight", "extractor.2.bias", "extractor.5.weight", "extractor.5.bias", "extractor.7.weight", "extractor.7.bias", "extractor.10.weight", "extractor.10.bias", "extractor.12.weight", "extractor.12.bias", "extractor.14.weight", "extractor.14.bias", "extractor.17.weight", "extractor.17.bias", "extractor.19.weight", "extractor.19.bias", "extractor.21.weight", "extractor.21.bias", "extractor.24.weight", "extractor.24.bias", "extractor.26.weight", "extractor.26.bias", "extractor.28.weight", "extractor.28.bias", "rpn.conv1.weight", "rpn.conv1.bias", "rpn.score.weight", "rpn.score.bias", "rpn.loc.weight", "rpn.loc.bias".
Unexpected key(s) in state_dict: "features.0.weight", "features.0.bias", "features.2.weight", "features.2.bias", "features.5.weight", "features.5.bias", "features.7.weight", "features.7.bias", "features.10.weight", "features.10.bias", "features.12.weight", "features.12.bias", "features.14.weight", "features.14.bias", "features.17.weight", "features.17.bias", "features.19.weight", "features.19.bias", "features.21.weight", "features.21.bias", "features.24.weight", "features.24.bias", "features.26.weight", "features.26.bias", "features.28.weight", "features.28.bias", "classifier.6.weight", "classifier.6.bias", "classifier.0.weight", "classifier.0.bias", "classifier.3.weight", "classifier.3.bias".

Thanks

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.