BabitMF / bmf

Cross-platform, customizable multimedia/video processing framework. With strong GPU acceleration, heterogeneous design, multi-language support, easy to use, multi-framework compatible and high performance, the framework is ideal for transcoding, AI inference, algorithm integration, live video streaming, and more.
https://babitmf.github.io/
Apache License 2.0
730 stars 60 forks source link

Fix the bug of Missing dependencies and DeOldify path set in demo colorization_python #118

Open JackLau1222 opened 1 month ago

JackLau1222 commented 1 month ago

DeOldify path set

the py_deoldify_module.py will be executed firstly, but the sys.path.insert(0, './DeOldify') writed in deoldify_demo.py, so there will be meeting error like this ModuleNotFoundError: No module named 'deoldify'

root@73559b1846e1:~/bmf/bmf/demo/colorization_python# python3 deoldify_demo.py 
Traceback (most recent call last):
File "deoldify_demo.py", line 2, in <module>
import py_deoldify_module
File "/root/bmf/bmf/demo/colorization_python/py_deoldify_module.py", line 7, in <module>
from deoldify import device
ModuleNotFoundError: No module named 'deoldify'

so i move the code into py_deoldify_module.py

# Add the DeOldify folder to the python search path
import sys

sys.path.insert(0, './DeOldify')
print(sys.path)

from deoldify import device

Missing dependencies

The DeOldify project missing dependence IPython

root@73559b1846e1:~/bmf/bmf/demo/colorization_python# python3.8 deoldify_demo.py 
['./DeOldify', '/root/bmf/bmf/demo/colorization_python', '/root/bmf/bmf/demo/colorization_python', '/usr/local/lib/python3.8/dist-packages/nvcv_python', '/root/bmf/output', '/usr/lib/python38.zip', '/usr/lib/python3.8', '/usr/lib/python3.8/lib-dynload', '/usr/local/lib/python3.8/dist-packages', '/usr/lib/python3/dist-packages']
INFO:matplotlib.font_manager:generated new fontManager
generated new fontManager
INFO:numexpr.utils:Note: NumExpr detected 40 cores but "NUMEXPR_MAX_THREADS" not set, so enforcing safe limit of 8.
Note: NumExpr detected 40 cores but "NUMEXPR_MAX_THREADS" not set, so enforcing safe limit of 8.
INFO:numexpr.utils:NumExpr defaulting to 8 threads.
NumExpr defaulting to 8 threads.
Traceback (most recent call last):
File "deoldify_demo.py", line 2, in <module>
import py_deoldify_module
File "/root/bmf/bmf/demo/colorization_python/py_deoldify_module.py", line 14, in <module>
from deoldify.visualize import *
File "/root/bmf/bmf/demo/colorization_python/./DeOldify/deoldify/visualize.py", line 13, in <module>
from IPython import display as ipythondisplay
ModuleNotFoundError: No module named 'IPython'

so i add a requirements.txt in the demo directory contains ipython

pip install BMF packages name is wrong in README.md

i fix it to the right name BabitMF and BabitMF-GPU but bmf