Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: 'VideoObjectDetection' object has no attribute 'detectCustomObjectsFromVideo'. Did you mean: 'detectObjectsFromVideo'? #842

Open
flybet opened this issue Oct 1, 2024 · 0 comments

Comments

@flybet
Copy link

flybet commented Oct 1, 2024

i follow the official guide prepared the environments, then i use the below code(the mode has been downloaded):

from imageai.Detection import VideoObjectDetection
import os

execution_path = os.getcwd()

detector = VideoObjectDetection()
detector.setModelTypeAsRetinaNet()
detector.setModelPath( os.path.join(execution_path , "retinanet_resnet50_fpn_coco-eeacb38b.pth"))
detector.loadModel()

custom_objects = detector.CustomObjects(person=True, bicycle=True, motorcycle=True)

video_path = detector.detectCustomObjectsFromVideo(
custom_objects=custom_objects,
input_file_path=os.path.join(execution_path, "traffic.mp4"),
output_file_path=os.path.join(execution_path, "traffic_custom_detected"),
frames_per_second=20, log_progress=True)
print(video_path)

i got an error said: AttributeError: 'VideoObjectDetection' object has no attribute 'detectCustomObjectsFromVideo'. Did you mean: 'detectObjectsFromVideo'?

python is 3.10,
below is the pip list:
Package Version


attrs 24.2.0
contourpy 1.3.0
cycler 0.12.1
Cython 3.0.11
filelock 3.15.4
fonttools 4.53.1
fsspec 2024.9.0
imageai 3.0.3
iniconfig 2.0.0
Jinja2 3.1.4
kiwisolver 1.4.7
MarkupSafe 2.1.5
matplotlib 3.9.2
mock 4.0.3
mpmath 1.3.0
networkx 3.3
numpy 2.1.1
nvidia-cublas-cu12 12.1.3.1
nvidia-cuda-cupti-cu12 12.1.105
nvidia-cuda-nvrtc-cu12 12.1.105
nvidia-cuda-runtime-cu12 12.1.105
nvidia-cudnn-cu12 9.1.0.70
nvidia-cufft-cu12 11.0.2.54
nvidia-curand-cu12 10.3.2.106
nvidia-cusolver-cu12 11.4.5.107
nvidia-cusparse-cu12 12.1.0.106
nvidia-nccl-cu12 2.20.5
nvidia-nvjitlink-cu12 12.6.68
nvidia-nvtx-cu12 12.1.105
opencv-python 4.10.0.84
packaging 24.1
pillow 10.4.0
pip 24.2
pluggy 1.5.0
py 1.11.0
pycocotools 2.0
pyparsing 3.1.4
pytest 7.1.3
python-dateutil 2.9.0.post0
scipy 1.14.1
setuptools 72.1.0
six 1.16.0
sympy 1.13.2
tomli 2.0.1
torch 2.4.1
torchvision 0.19.1
tqdm 4.64.1
triton 3.0.0
typing_extensions 4.12.2
wheel 0.43.0

i don't now how to fix this problem , yours help will be appreciated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant