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

ImportError: cannot import name im_detect_2stream #5

Open
NIEYALI opened this issue Jun 19, 2017 · 9 comments
Open

ImportError: cannot import name im_detect_2stream #5

NIEYALI opened this issue Jun 19, 2017 · 9 comments

Comments

@NIEYALI
Copy link

NIEYALI commented Jun 19, 2017

Thanks for your great work, but when I tried test reuslt, I met the following problem, Do you have any idea?
Thanks a lot @vra
python action_tools/eval_linked_results.py --imdb UCF101_RGB_1_FLOW_5_split_0 --res /home/user1/YALI/action-faster-rcnn/ucf101_vdets_3scales_rgb1flow5.pkl
Traceback (most recent call last):
File "action_tools/eval_linked_results.py", line 5, in
import action_util as action
File "/home/user1/YALI/action-faster-rcnn/action_tools/action_util.py", line 8, in
from fast_rcnn.test import im_detect, im_detect_2stream
ImportError: cannot import name im_detect_2stream

@vra
Copy link
Contributor

vra commented Jun 20, 2017

Hi @NIEYALI,
This error appears because the define of function im_detect_2stream is not found in file ROOT/lib/fast_rcnn/test.py, I met this error too when I ran the code. So this is an error of source code, waiting for the answer from author @pengxj.
As a trial, I change the Line 8 to from fast_rcnn.test import im_detect, and Line 112 to scores, boxes = im_detect(net, im, flows), this error disappears. But I don't the difference between im_detect and im_detect_2stream, hoping to hear from author.

@NIEYALI
Copy link
Author

NIEYALI commented Jun 20, 2017

Thanks for your reply, But I have another question following:
if 'RGB' in image_set and 'FLOW' in image_set:
self._data_path = '/home/lear/xpeng/data/UCF101/flows_color'
else:
self.MOD = image_set.split('')[1]
self.LEN = image_set.split('')[2]
self._data_path = None
if self._MOD=='RGB': self._data_path = '/home/lear/xpeng/data/UCF101/frames_240'
if self._MOD=='FLOW': self._data_path = '/home/lear/xpeng/data/UCF101/flows_color'

These three path, where could I find' flows_color, frames_240, flows_color'
I have no idea about them, could you give some suggestions?
Thanks a lot.
@vra
@pengxj

@vra
Copy link
Contributor

vra commented Jun 20, 2017

Hi @NIEYALI ,
These paths are where you host your RGB images and flow images, which is not included in the source code, so you may change them to the paths to image data in your computer.

@pengxj
Copy link
Owner

pengxj commented Jun 20, 2017

Hi @NIEYALI @vra ,
I just updated the test.py file in lib/fast_rcnn. Now should be ok.

@pengxj
Copy link
Owner

pengxj commented Jun 20, 2017

Hi @vra @NIEYALI ,
The code for optical flow is updated, thanks for checking.

@vra
Copy link
Contributor

vra commented Jun 20, 2017

Hi @pengxj,
Thanks for your quick updating! 👍

@chengshuai
Copy link

Hi @pengxj @vra

I dowdload the UCF101 datasets,but i cannot find the anno files, could you gave me the link that i can download the files,for example baidupan or driverbox?

@chengshuai
Copy link

Hi @vra

self._data_path = '/home/lear/xpeng/data/UCF101/flows_color'
......
if self._MOD=='RGB': self._data_path = '/home/lear/xpeng/data/UCF101/frames_240'
if self._MOD=='FLOW': self._data_path = '/home/lear/xpeng/data/UCF101/flows_color'

what is these three path stand for?

@pengxj
Copy link
Owner

pengxj commented Jul 13, 2017

@chengshuai Please refer to the THUMOS Challenge 2015 website for annotations or you can find some information here https://github.com/gurkirt/corrected-UCF101-Annots.

'frames_240' is the root dir. where you store your videos frames of the dataset. And flows_color is the root of flow frames.

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

4 participants