Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

example running issue #3

Open
mangoHoli opened this issue Aug 9, 2017 · 7 comments
Open

example running issue #3

mangoHoli opened this issue Aug 9, 2017 · 7 comments

Comments

@mangoHoli
Copy link

$ python 3dcnn.py --batch 32 --epoch 50 --videos dataset/ --nclass 10 --output 3dcnnresult/ --color True --skip False --depth 15
Using TensorFlow backend.
Couldn't import dot_parser, loading of dot files will not be possible.
/usr/local/lib/python2.7/dist-packages/sklearn/cross_validation.py:44: DeprecationWarning: This module was deprecated in version 0.18 in favor of the model_selection module into which all the refactored classes and functions are moved. Also note that the interface of the new CV iterators are different from that of this module. This module will be removed in 0.20.
"This module will be removed in 0.20.", DeprecationWarning)
0%| | 0/101 [00:00<?, ?it/s]dataset/RockClimbingIndoor
OpenCV Error: Assertion failed (ssize.width > 0 && ssize.height > 0) in resize, file /io/opencv/modules/imgproc/src/imgwarp.cpp, line 3492
Traceback (most recent call last):
File "3dcnn.py", line 169, in
main()
File "3dcnn.py", line 113, in main
args.output, args.color, args.skip)
File "3dcnn.py", line 76, in loaddata
X.append(vid3d.video3d(name, color=color, skip=skip))
File "/home/hollyemotion/workspace/3dcnn/videoto3d.py", line 24, in video3d
frame = cv2.resize(frame, (self.height, self.width))
cv2.error: /io/opencv/modules/imgproc/src/imgwarp.cpp:3492: error: (-215) ssize.width > 0 && ssize.height > 0 in function resize

1%|█▍ | 1/101 [00:00<00:03, 29.81it/s]

Thank you for your sharing of 3DCNN, its terse and beautiful. However, got this error when i tried to run the UCF101 database directly. BTW, the plot in keras is now: from keras.utils.vis_utils import plot_model.

@rysmarie
Copy link
Collaborator

Could you tell me the environment? (version of python, opencv)
If you haven't installed pydot, plese install it.(pip install pydot)
OpenCV Error can occur when you didn't build OpenCV with ffmpeg.
At last, you might have used old version of 3dcnn.py. I've already updated it and I import plot_model from keras.utils.vis_utils in the latest code.

@mangoHoli
Copy link
Author

Hi, I think I found the problem.
My environment is python2.7 and opencv3.
I think the problem is just about the format of dataset. When I downloaded the UCF101 database, the videos are under those sub folders with folder name as label, but when you load the videos, you load directly the videos and extract the label from the name of the videos, which, in my case, loaded the folders. Maybe you could add this part about the data format in the intro, thank you.

@Linranran
Copy link

cv2.error: /home/lin/opencv-3.3.0/modules/imgproc/src/imgwarp.cpp:3483: error: (-215) ssize.width > 0 && ssize.height > 0 in function resize

1%| | 1/101 [00:00<00:04, 22.50it/s]
我也遇见了和一楼一样的问题,是读文件时出问题了。在UCF101/PushUps/文件夹下还需要再次遍历读取视频。

@bingo9062
Copy link

@Linranran 请问代码怎么改呀?我也遇到了同样的问题

@Linranran
Copy link

@bingo9062 这个问题是解压文件时候产生的问题,你要是直接用 tar -xzvf 解压数据集文件试试。我是直接右击解压的,就出现问题了。解决方法大概就是:再遍历子文件夹,读取图片。label的赋值也要稍微变一下,你自己多试试。

@bingo9062
Copy link

我发现都放到一个文件夹下就好了,我是mac系统,不知为什么opencv处理avi文件报错,mp4文件没问题

@Mehra9999
Copy link

Hi, I think I found the problem.
My environment is python2.7 and opencv3.
I think the problem is just about the format of dataset. When I downloaded the UCF101 database, the videos are under those sub folders with folder name as label, but when you load the videos, you load directly the videos and extract the label from the name of the videos, which, in my case, loaded the folders. Maybe you could add this part about the data format in the intro, thank you.

Hi, Can you please share how you solved this issue as I am facing a similar issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants