Open davidhorrock0949 opened 11 months ago
I tried using docker and i am getting the same error ( more or less ) :
No CUDA runtime is found, using CUDA_HOME='/usr/local/cuda'
Traceback (most recent call last):
File "/workspace/phar/mmaction2/demo/demo_skeleton.py", line 16, in <module>
from mmdet.apis import inference_detector, init_detector
File "/opt/conda/lib/python3.8/site-packages/mmdet/apis/__init__.py", line 1, in <module>
from .inference import (async_inference_detector, inference_detector,
File "/opt/conda/lib/python3.8/site-packages/mmdet/apis/inference.py", line 6, in <module>
from mmcv.ops import RoIPool
File "/opt/conda/lib/python3.8/site-packages/mmcv/ops/__init__.py", line 2, in <module>
from .assign_score_withk import assign_score_withk
File "/opt/conda/lib/python3.8/site-packages/mmcv/ops/assign_score_withk.py", line 5, in <module>
ext_module = ext_loader.load_ext(
File "/opt/conda/lib/python3.8/site-packages/mmcv/utils/ext_loader.py", line 13, in load_ext
ext = importlib.import_module('mmcv.' + name)
File "/opt/conda/lib/python3.8/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ImportError: /opt/conda/lib/python3.8/site-packages/mmcv/_ext.cpython-38-x86_64-linux-gnu.so: undefined symbol: _Z27points_in_boxes_cpu_forwardN2at6TensorES0_S0_
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "src/demo/multimodial_demo.py", line 20, in <module>
from demo.demo_skeleton import frame_extraction
File "/workspace/phar/mmaction2/demo/demo_skeleton.py", line 18, in <module>
raise ImportError('Failed to import `inference_detector` and '
ImportError: Failed to import `inference_detector` and `init_detector` form `mmdet.apis`. These apis are required in this demo!
Can you try to upgrade numpy to 1.23.0
?
I'll give it a shot this weekend and report back, thanks!
I didn't work for me . I've also get the hotfixes branch and here is the latest errors when I try to run multimodial_demo.py :
No CUDA runtime is found, using CUDA_HOME='/usr/local/cuda
Traceback (most recent call last):
File "/workspace/phar/mmaction2/demo/demo_skeleton.py", line 16, in <module>
from mmcv.ops import RoIPool
File "/opt/conda/lib/python3.8/site-packages/mmcv/ops/__init__.py", line 2, in <module>
from .assign_score_withk import assign_score_withk
File "/opt/conda/lib/python3.8/site-packages/mmcv/ops/assign_score_withk.py", line 5, in <module>
ext_module = ext_loader.load_ext(
File "/opt/conda/lib/python3.8/site-packages/mmcv/utils/ext_loader.py", line 13, in load_ext
ext = importlib.import_module('mmcv.' + name)
File "/opt/conda/lib/python3.8/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ImportError: libcudart.so.10.2: cannot open shared object file: No such file or directory
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "src/demo/multimodial_demo.py", line 20, in <module>
from demo.demo_skeleton import frame_extraction
File "/workspace/phar/mmaction2/demo/demo_skeleton.py", line 18, in <module>
raise ImportError('Failed to import `inference_detector` and '
ImportError: Failed to import `inference_detector` and `init_detector` form `mmdet.apis`. These apis are required in this demo!`
Had the exact same issue as @AshoPash and could not figure out how to resolve it.
@rlleshi when upgrading numpy to 1.23.0 inside the docker container, i could run the demo:
root@7edfcf328b82:/workspace/phar# pip install --force-reinstall numpy==1.23.0
Collecting numpy==1.23.0
Downloading numpy-1.23.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (17.1 MB)
|████████████████████████████████| 17.1 MB 1.8 MB/s
Installing collected packages: numpy
Attempting uninstall: numpy
Found existing installation: numpy 1.22.4
Uninstalling numpy-1.22.4:
Successfully uninstalled numpy-1.22.4
ERROR: After October 2020 you may experience errors when installing or updating packages. This is because pip will change the way that it resolves dependency conflicts.
We recommend you use --use-feature=2020-resolver to test your packages with the new resolver before it becomes the default.
scikit-image 0.21.0 requires pillow>=9.0.1, but you'll have pillow 8.1.1 which is incompatible.
imageio 2.34.0 requires pillow>=8.3.2, but you'll have pillow 8.1.1 which is incompatible.
albumentations 1.4.0 requires numpy>=1.24.4, but you'll have numpy 1.23.0 which is incompatible.
Successfully installed numpy-1.23.0
root@7edfcf328b82:/workspace/phar# python src/demo/multimodial_demo.py /video.mp4 demo.json --timestamps
No CUDA runtime is found, using CUDA_HOME='/usr/local/cuda'
Resizing video for faster inference...
Moviepy - Building video temp/video.mp4.
MoviePy - Writing audio in videoTEMP_MPY_wvf_snd.mp3
MoviePy - Done.
Moviepy - Writing video temp/video.mp4
Moviepy - Done !
Moviepy - video ready temp/video.mp4
load checkpoint from local path: checkpoints/har/timeSformer.pth
Traceback (most recent call last):
File "src/demo/multimodial_demo.py", line 601, in <module>
main()
File "src/demo/multimodial_demo.py", line 540, in main
RGB_MODEL = init_recognizer(args.rgb_config,
File "/workspace/phar/mmaction2/mmaction/apis/inference.py", line 51, in init_recognizer
model.to(device)
File "/opt/conda/lib/python3.8/site-packages/torch/nn/modules/module.py", line 673, in to
return self._apply(convert)
File "/opt/conda/lib/python3.8/site-packages/torch/nn/modules/module.py", line 387, in _apply
module._apply(fn)
File "/opt/conda/lib/python3.8/site-packages/torch/nn/modules/module.py", line 387, in _apply
module._apply(fn)
File "/opt/conda/lib/python3.8/site-packages/torch/nn/modules/module.py", line 387, in _apply
module._apply(fn)
File "/opt/conda/lib/python3.8/site-packages/torch/nn/modules/module.py", line 409, in _apply
param_applied = fn(param)
File "/opt/conda/lib/python3.8/site-packages/torch/nn/modules/module.py", line 671, in convert
return t.to(device, dtype if t.is_floating_point() or t.is_complex() else None, non_blocking)
File "/opt/conda/lib/python3.8/site-packages/torch/cuda/__init__.py", line 170, in _lazy_init
torch._C._cuda_init()
RuntimeError: 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
however, it didn't actually work because of CUDA problems with the container.
i couldn't get the demo to run outside a container because i couldn't find a working combination of corresponding versions between cuda, torch and mmcv which would work under ubuntu 22.04
I have it working using numpy 1.23.0 as the only change to the software configuration; there was also a bug fix, #17. Beyond that, I have it running on the the Deep Learning AMI from AWS - the pyTorch Ubuntu 20.04 edition on g5.4xlarge instances, which is overpowered - g5.xlarge would do. The dlami is a "known working" combo of tools, it includes the nvidia-container-toolkit.
It works, but is woefully inaccurate on my data set. I'm looking for ways to visualize the output better.
@orangekittysoftware Any progress on this? I'm also going to try the same thing as I don't have a NVIDIA GPU.
Why is it so inaccurate on your dataset?
@orangekittysoftware Any progress on this? I'm also going to try the same thing as I don't have a NVIDIA GPU. Well, running that special g5.x4large was expensive and delicate so I do it occasionally. Must be shut off after use. It was fast though!
I found I could run about 4-6 videos at a time in a g5.4xlarge at 480p. I did not try much more or try to stress test it.
Anyway, I may have the chance to try running it locally on NVIDIA hardware.
Why is it so inaccurate on your dataset?
Ahem, "dataset bias due to preference"? I'll speak a bit more openly to it because I think it speaks to a modeling issue: The existing models for PHAR are hardcore - based on two people. But a lot of porn is solo / softcore - which also has some different problems for HAR. I'd be interested in a side project to create a PHAR-like model and actionset set for softcore.
Makes sense, Thanks. I'm going to get a NVidia GPU and will see what the results are once i have it hopefully by end of week, this repo is still the most promising multi-label porn solution I have seen so far.
Tried to use AWS but they don't allow you to use g-family EC2 instances for new AWS accounts anymore due to crypto miners abusing it and I lost my old account :(
I'm wanting to extend this repo and train it on specific fetishes as I think this is something that is not being addressed by the existing ML solutions by mindgeek and other providers that currently use ML.
Got it working, with thanks from @orangekittysoftware suggestion and fix PR, seems to work well on a simple oral video.
By the way, I am using vast.ai to rent cheap RTX GPU's instead of AWS. It's much cheaper. Would recommend it.
Hi,
I can't get the docker image to run, it gives me the following error:
docker run rlleshi/phar python src/demo/multimodial_demo.py video.mp4 demo.json --timestamps
When I compile from source, I get almost the same error:
When compiling from source, I made sure I had the right versions of the libraries by compiling from the exact git checkpoints referenced by your code:
mmaction2 0.23.0 /ml/phar/mmaction2 mmcv 1.3.18 /ml/phar/mmcv mmdet 2.12.0 /ml/phar/mmdet mmpose 0.22.0 /ml/phar/mmpose
Any ideas? Thanks.