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

[SOLUTIONS] Insights for setting up #5

Open
gycka opened this issue Aug 28, 2019 · 4 comments
Open

[SOLUTIONS] Insights for setting up #5

gycka opened this issue Aug 28, 2019 · 4 comments

Comments

@gycka
Copy link

gycka commented Aug 28, 2019

I was setting this up in the end of August, 2019. Here are some findings that you need to do/change to make this work:

  • scipy.misc.imsave() has been deprecated (in SciPy 1.0.0), instead, use import imageio and imageio.imwrite()
  • cv2.createOptFlow_DualTVL1() did not work with opencv 4.X.X (pip install opencv-python). If installed this way, remove it (pip uninstall opencv-python) and install its different version (pip install opencv-contrib-python). Next, change cv2.createOptFlow_DualTVL1() to dtvl1=cv2.optflow.DualTVL1OpticalFlow_create()
  • I had problems with the skvideo.io.vread() function. I had both ffmpeg/ffprobe installed using pip, but that did not work. I had success with conda install -c mrinaljain17 ffmpeg, but you can also install it from source.
  • As I had a different dataset setup than the author (I simply extracted UCF101 dataset, so my paths looked like this: ../../UCF-101/ApplyEyeMakeup/v_ApplyEyeMakeup_g01_c01.avi, which I believe is the norm). Due to this, I had to remove the second argument for os.path.join() function found right after the main function and args = ... For example, the first line became data_root=os.path.join(args.data_root)
  • If you are not parsing any arguments, change the default value for data_root. For example, parser.add_argument('--data_root',default='../../Downloads/UCF-101',type=str)

Hope this helps. Thank you for the scripts.

@sanolans
Copy link

sanolans commented Sep 24, 2019

Hi! I followed your solution but I'm getting the following error: NameError: name 'videos_root' is not defined. Did you encounter this error and how did you resolve it if you did?

Error details:
`runfile('D:/Clones/py-denseflow-master/denseflow1.py', wdir='D:/Clones/py-denseflow-master')
find 13320 videos.
get videos list done!
Traceback (most recent call last):

File "", line 1, in
runfile('D:/Clones/py-denseflow-master/denseflow1.py', wdir='D:/Clones/py-denseflow-master')

File "C:\Users\sancy\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 827, in runfile
execfile(filename, namespace)

File "C:\Users\sancy\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 110, in execfile
exec(compile(f.read(), filename, 'exec'), namespace)

File "D:/Clones/py-denseflow-master/denseflow1.py", line 184, in
pool.map(dense_flow,zip(video_list,flows_dirs,[step]*len(video_list),[bound]*len(video_list)))

File "C:\Users\sancy\Anaconda3\lib\multiprocessing\pool.py", line 290, in map
return self._map_async(func, iterable, mapstar, chunksize).get()

File "C:\Users\sancy\Anaconda3\lib\multiprocessing\pool.py", line 683, in get
raise self._value

NameError: name 'videos_root' is not defined`

@g2-bernotas
Copy link

@sanolans it seems that you somehow have deleted (?) videos_root variable. If you check the original code on this repository (denseflow.py) line 163 you will see that variable. I slightly modified it due to my set up, so it simply became:

args=parse_args()
data_root=os.path.join(args.data_root)
videos_root=os.path.join(data_root)

If you need further help, please provide your main code (denseflow.py -> if name=='main'.

@sanolans
Copy link

Thanks for replying, its working now. However it stop after processing a number of videos, so I have to restart it.

@Malithi-gif
Copy link

Can anyone help me?
image

image

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