takiyu / hyperface

Deep Neural Network (DNN) which predicts face/non-face, landmarks, pose and gender simultaneously with Chainer.
MIT License
176 stars 45 forks source link

raise IndexError #4

Open fengyuxi55 opened 7 years ago

fengyuxi55 commented 7 years ago

Hello, thanks for your impressive work! When I run your code to reproduce the work, I met the following errors:

[2017/08/28 09:51:03] WARNING (13199) datasets : No selective search rectangle Process Process-10:...........................................] 4.93% Traceback (most recent call last):ochs File "/home/users/yuxi.feng/anaconda2/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap self.run() File "/home/users/yuxi.feng/anaconda2/lib/python2.7/multiprocessing/process.py", line 114, in run self._target(*self._args, **self._kwargs) File "/home/users/yuxi.feng/anaconda2/lib/python2.7/site-packages/chainer/iterators/multiprocess_iterator.py", line 162, in _worker out_queue.put(dataset[index]) File "/home/users/yuxi.feng/anaconda2/lib/python2.7/site-packages/chainer/dataset/dataset_mixin.py", line 30, in getitem return self.get_example(index) File "/home/users/yuxi.feng/anaconda2/lib/python2.7/site-packages/chainer/datasets/sub_dataset.py", line 75, in get_example return self._dataset[index] File "/home/users/yuxi.feng/anaconda2/lib/python2.7/site-packages/chainer/dataset/dataset_mixin.py", line 30, in getitem return self.get_example(index) File "/home/users/yuxi.feng/Project/hyperface/scripts/datasets.py", line 293, in get_example raise IndexError IndexError I used aflw datasets as your example mentined, it seems some exapmles has no proposal rects??

takiyu commented 7 years ago

It sometimes occurs because bugs are contained in codes of facial rectangles.

I used rectangle structure of OpenCV (x, y, w, h). However the image shapes of OpenCV are [h, w, c]. I think I made a mistake about width, height and image sizes. The same can be said to #3.

The simplest solutions are to remove the cache and recompute it or to restart the training. I would be glad if you give me a pull request about the bug.

lilaczhou commented 5 years ago

@takiyu Hello,your code helps me a lot,Thanks for your contribution!But while I am running the code,it always tells me IndexError。After dection,I think there is no values in ssrects。I found that the filepath in aflw.sqlite doesn't correspond to the path in flickr/ file,does it influence my running?I hope you can give me some hints,Thank you very much。