hzwer / ECCV2022-RIFE

ECCV2022 - Real-Time Intermediate Flow Estimation for Video Frame Interpolation
MIT License
4.41k stars 438 forks source link

Get ERROR: AttributeError: module 'numpy' has no attribute 'float' #302

Closed catscarlet closed 1 year ago

catscarlet commented 1 year ago

I was using rife but suddenly it won't work anymore.

cat@cat-B85M-D3H:/var/www/html/ECCV2022-RIFE$ sudo docker run --rm -it -v $PWD:/host rife:latest inference_video --exp=1 --video=test.mp4 --output=test_x21.mp4
Loaded v3.x HD model.
Traceback (most recent call last):
  File "/rife/inference_video.py", line 124, in <module>
    lastframe = next(videogen)
  File "/usr/local/lib/python3.8/site-packages/skvideo/io/io.py", line 251, in vreader
    reader = FFmpegReader(fname, inputdict=inputdict, outputdict=outputdict, verbosity=verbosity)
  File "/usr/local/lib/python3.8/site-packages/skvideo/io/ffmpeg.py", line 103, in __init__
    self.inputfps = np.float(parts[0])/np.float(parts[1])
  File "/usr/local/lib/python3.8/site-packages/numpy/__init__.py", line 284, in __getattr__
    raise AttributeError("module {!r} has no attribute "
AttributeError: module 'numpy' has no attribute 'float'

run sudo docker run --rm -it --gpus all -v /dev/dri:/dev/dri -v $PWD:/host rife:latest inference_video --exp=1 --video=test.mp4 --output=untitled_rife.mp4 got same error.

Maybe because I upgrade the driver from 515 to 525?

hzwer commented 1 year ago

"pip install "numpy<1.24" to work around it." from https://stackoverflow.com/questions/74844262/how-to-solve-error-numpy-has-no-attribute-float-in-python

catscarlet commented 1 year ago

"pip install "numpy<1.24" to work around it." from https://stackoverflow.com/questions/74844262/how-to-solve-error-numpy-has-no-attribute-float-in-python

It works. Thank you.