OlafenwaMoses / ImageAI

A python library built to empower developers to build applications and systems with self-contained Computer Vision capabilities
https://www.genxr.co/#products
MIT License
8.5k stars 2.19k forks source link

ImportError: cannot import name 'VideoObjectDetection' #116

Closed Devraj004 closed 5 years ago

Devraj004 commented 5 years ago

Hi Ola, Not sure what is the issue , When i ran my program first time it loaded perfectly. but when tried second time start getting import error. I checked all the modules and folders are available at correct path.

Here is the error.

Traceback (most recent call last): File "cv2.py", line 14, in from imageai.Detection import VideoObjectDetection File "C:\Python27\Python27\imageai\Detection__init__.py", line 1, in

import cv2

File "C:\Python27\Python27\cv2.py", line 14, in from imageai.Detection import VideoObjectDetection ImportError: cannot import name 'VideoObjectDetection'

need your help to resolve this.

Devraj004 commented 5 years ago

My bad, I realized that the python file name is cv2 which itself a opencv module in python and that's why i was getting import error. I renamed the file and the issue got resolved. Many thanks Ola. You guys have really created a awesome python library.

Kind Regards Devraj

OlafenwaMoses commented 5 years ago

Glad to know you have resolved this. You are welcome.