zh-plus / video-to-pose3D

Convert video to 3D pose in one-key.
MIT License
646 stars 130 forks source link

Found no NVIDIA driver on your system. #32

Closed Sba-Stuff closed 4 years ago

Sba-Stuff commented 4 years ago

Here is The Error: C:\Users\Muhammad Wajeeh\Desktop\VoiceCloneApp\vidpose>"C:\Users\Muhammad Wajeeh\Desktop\VoiceCloneApp\python.exe" videopose.py kunkun_cut.mp4 --- elapsed time: 0.6922928 s Traceback (most recent call last): File "videopose.py", line 332, in inference_video('kunkun_cut.mp4', 'alpha_pose') File "videopose.py", line 195, in inference_video main(args) File "videopose.py", line 67, in main detector_2d = get_detector_2d(args.detector_2d) File "videopose.py", line 55, in get_detector_2d return detector_map[detector_name]() File "videopose.py", line 40, in get_alpha_pose from joints_detectors.Alphapose.gene_npz import generate_kpts as alpha_pose File "C:\Users\Muhammad Wajeeh\Desktop\VoiceCloneApp\vidpose\joints_detectors\Alphapose\gene_npz.py", line 22, in self.device = device NameError: name 'device' is not defined

C:\Users\Muhammad Wajeeh\Desktop\VoiceCloneApp\vidpose>command.bat

C:\Users\Muhammad Wajeeh\Desktop\VoiceCloneApp\vidpose>"C:\Users\Muhammad Wajeeh\Desktop\VoiceCloneApp\python.exe" videopose.py the video is 25.051 f/s Loading YOLO model.. kunkun_cut.mp4 --- elapsed time: 2.4925298000000002 s Traceback (most recent call last): File "videopose.py", line 332, in inference_video('kunkun_cut.mp4', 'alpha_pose') File "videopose.py", line 195, in inference_video main(args) File "videopose.py", line 74, in main keypoints = detector_2d(video_name) File "C:\Users\Muhammad Wajeeh\Desktop\VoiceCloneApp\vidpose\joints_detectors\Alphapose\gene_npz.py", line 38, in generate_kpts final_result, video_name = handle_video(video_file) File "C:\Users\Muhammad Wajeeh\Desktop\VoiceCloneApp\vidpose\joints_detectors\Alphapose\gene_npz.py", line 124, in handle_video det_loader = DetectionLoader(data_loader, batchSize=args.detbatch).start() File "C:\Users\Muhammad Wajeeh\Desktop\VoiceCloneApp\vidpose\joints_detectors\Alphapose\dataloader.py", line 280, in init self.det_model.cuda() File "C:\Users\Muhammad Wajeeh\Desktop\VoiceCloneApp\lib\site-packages\torch\nn\modules\module.py", line 305, in cuda return self._apply(lambda t: t.cuda(device)) File "C:\Users\Muhammad Wajeeh\Desktop\VoiceCloneApp\lib\site-packages\torch\nn\modules\module.py", line 202, in _apply module._apply(fn) File "C:\Users\Muhammad Wajeeh\Desktop\VoiceCloneApp\lib\site-packages\torch\nn\modules\module.py", line 202, in _apply module._apply(fn) File "C:\Users\Muhammad Wajeeh\Desktop\VoiceCloneApp\lib\site-packages\torch\nn\modules\module.py", line 202, in _apply module._apply(fn) File "C:\Users\Muhammad Wajeeh\Desktop\VoiceCloneApp\lib\site-packages\torch\nn\modules\module.py", line 224, in _apply param_applied = fn(param) File "C:\Users\Muhammad Wajeeh\Desktop\VoiceCloneApp\lib\site-packages\torch\nn\modules\module.py", line 305, in return self._apply(lambda t: t.cuda(device)) File "C:\Users\Muhammad Wajeeh\Desktop\VoiceCloneApp\lib\site-packages\torch\cuda__init.py", line 192, in _lazy_init _check_driver() File "C:\Users\Muhammad Wajeeh\Desktop\VoiceCloneApp\lib\site-packages\torch\cuda\init__.py", line 102, in _check_driver http://www.nvidia.com/Download/index.aspx""") AssertionError: Found no NVIDIA driver on your system. Please check that you have an NVIDIA GPU and installed a driver from http://www.nvidia.com/Download/index.aspx

Can We Run It ON CPU?

zh-plus commented 4 years ago

I believe that it would cost half a day if you don't use GPU, which is unendurable. Thus, I'll not update this repository to support the pure CPU machine. However, if you insist, you can try to refactor it, such as changing the .cuda() into .cup().

Sba-Stuff commented 4 years ago

Thanks For Comment. I do have 8 GB of RAM. But I don't think its makes any difference.

Sba-Stuff commented 4 years ago

I used TextCrawler to replace all ".cuda()" instance files

with ".cpu()"

Then I got error, that i googled and fixed it using this thread: https://stackoverflow.com/questions/56369030/runtimeerror-attempting-to-deserialize-object-on-a-cuda-device

Now Your code is working, hope will work and helps. I hope now i am going to RUN any cuda asking code by replacing it with CPU. Thanks For Increasing my knowledge and research.

Thumbnail