ImportError: cannot import name im_detect_2stream
NIEYALI opened this issue · comments
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
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.
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
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.
Hi @pengxj,
Thanks for your quick updating! 👍
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?
@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.