ihababdelkareem / video-summarization

Key-frame based summarization of videos
24 stars 4 forks source link

No module named 'cv2' #21

Open JoHn9988 opened 1 year ago

JoHn9988 commented 1 year ago

Hey, I have installed all the required packages but after I run the main.py, the system reminded me that No module named 'cv2', I have uninstalled and installed again the same packages, but still didn't work. Could you please help check it? much thanks!

File "/Users/xxxx/Downloads/video-summarization-master/src/main.py", line 4, in from src.utils.inputVideo import InputVideo File "/Users/xxxx/Downloads/video-summarization-master/src/utils/inputVideo.py", line 5, in from src.utils.bow.vbow import BOV File "/Users/xxxx/Downloads/video-summarization-master/src/utils/bow/vbow.py", line 1, in import cv2 ModuleNotFoundError: No module named 'cv2'

JoHn9988 commented 1 year ago

I have fixed the problem above, and now the scenes extraction works well, but there's still some problems about extracting the key frames from each scene. Could you please take a look at the following logs? much thanks!

Traceback (most recent call last): File "/Users/xxxx/Downloads/video-summarization-master/src/main.py", line 62, in summarize(input_video) File "/Users/xxxx/Downloads/video-summarization-master/src/main.py", line 42, in summarize kfs = sampled_video.generateKeyframes_multiprocessing() File "/Users/xxxx/Downloads/video-summarization-master/src/utils/inputVideo.py", line 377, in generateKeyframes_multiprocessing p.start() File "/opt/anaconda3/envs/opencv/lib/python3.8/multiprocessing/process.py", line 121, in start self._popen = self._Popen(self) File "/opt/anaconda3/envs/opencv/lib/python3.8/multiprocessing/context.py", line 224, in _Popen return _default_context.get_context().Process._Popen(process_obj) File "/opt/anaconda3/envs/opencv/lib/python3.8/multiprocessing/context.py", line 284, in _Popen return Popen(process_obj) File "/opt/anaconda3/envs/opencv/lib/python3.8/multiprocessing/popen_spawn_posix.py", line 32, in init super().init(process_obj) File "/opt/anaconda3/envs/opencv/lib/python3.8/multiprocessing/popen_fork.py", line 19, in init self._launch(process_obj) File "/opt/anaconda3/envs/opencv/lib/python3.8/multiprocessing/popen_spawn_posix.py", line 47, in _launch reduction.dump(process_obj, fp) File "/opt/anaconda3/envs/opencv/lib/python3.8/multiprocessing/reduction.py", line 60, in dump ForkingPickler(file, protocol).dump(obj) TypeError: cannot pickle 'cv2.VideoCapture' object