Imageai: Windows 10 issue

Created on 28 Jun 2019  Â·  10Comments  Â·  Source: OlafenwaMoses/ImageAI

Hello
I was using sample code to perform the object detection for some time. It worked perfectly fine so far but recently I got new laptop with Window10 on it.

Below is code and error I am getting

Error
ValueError: Ensure you specified correct input image, input type, output type and/or output image path


Code
from imageai.Detection import ObjectDetection
import os

execution_path = os.getcwd()

detector = ObjectDetection()
detector.setModelTypeAsYOLOv3()
detector.setModelPath( os.path.join(execution_path , "yolo.h5"))
detector.loadModel()
detections = detector.detectObjectsFromImage(input_image=os.path.join(execution_path , "image2.jpg"), output_image_path=os.path.join(execution_path , "image2new.jpg"), minimum_percentage_probability=30)

for eachObject in detections:
print(eachObject["name"] , " : ", eachObject["percentage_probability"], " : ", eachObject["box_points"] )
print("--------------------------------")

Most helpful comment

yes

On Wed, Sep 4, 2019 at 5:43 PM MOSES OLAFENWA notifications@github.com
wrote:

@prashantsondkar https://github.com/prashantsondkar Have you found a
solution to the problem?

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/OlafenwaMoses/ImageAI/issues/237?email_source=notifications&email_token=AMHS7FSUEE255V37VBXWZHDQH6RANA5CNFSM4H4HA7S2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD53LM6I#issuecomment-527873657,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AMHS7FVSKMLWZ3DILWM2H5DQH6RANANCNFSM4H4HA7SQ
.

--
Thanks and Regards,
Anchu H. More
Data Engineer
SimpleWorks Solutions Pvt. Ltd.
No. 10/4, STPI, IT Park, Gayatri Nagar, Near VNIT College, Nagpur 440022
ISO 27001:2013 Certified
www.simplecrm.co http://www.simplecrm.com.sg/m.sg

All 10 comments

Have you verified if the file image2.jpg is still in the same folder as the python file.

Absolutely
Image is in same folder

Not sure what is going on
Exact same code , exact same folder , exact same image
Tradition from one laptop to other with window 7 changed to windows 10

Please uninstall and re-install ImageAI maybe it will fix the problem.

where you are running the code....if it is in spyder then keep open that image folder...or give whole path along with directory ...before it write r

Did you re install imageAI and run it again as suggested by @OlafenwaMoses ? Did it solve the issue?

If not, can you provide the full stack trace of the error?

Thanks

yes it is working properly , but i just wanted to know if we have less data
eg 50 images per classes will it work properly and i also wanted to know
how it will work on fake ID detection

On Wed, Sep 4, 2019 at 2:28 AM Rodrigo Laguna notifications@github.com
wrote:

Did you re install imageAI and run it again as suggested by @OlafenwaMoses
https://github.com/OlafenwaMoses ? Did it solve the issue?

If not, can you provide the full stack trace of the error?

Thanks

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/OlafenwaMoses/ImageAI/issues/237?email_source=notifications&email_token=AMHS7FVIOQO2PYWHLEQIM53QH3FYPA5CNFSM4H4HA7S2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5ZRVYQ#issuecomment-527637218,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AMHS7FXNIU7KHOQYSPMNDF3QH3FYPANCNFSM4H4HA7SQ
.

--
Thanks and Regards,
Anchu H. More
Data Engineer
SimpleWorks Solutions Pvt. Ltd.
No. 10/4, STPI, IT Park, Gayatri Nagar, Near VNIT College, Nagpur 440022
ISO 27001:2013 Certified
www.simplecrm.co http://www.simplecrm.com.sg/m.sg

@anchu-simplecrm

  • If you are to train a detection model, I will suggest you obtain about 120-150 images to train a fairly accurate model.
  • If you are to train a prediction model, you need at least 300 images should you use transfer learning or at least 500 images without transfer learning.

@prashantsondkar Have you found a solution to the problem?

yes

On Wed, Sep 4, 2019 at 5:43 PM MOSES OLAFENWA notifications@github.com
wrote:

@prashantsondkar https://github.com/prashantsondkar Have you found a
solution to the problem?

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/OlafenwaMoses/ImageAI/issues/237?email_source=notifications&email_token=AMHS7FSUEE255V37VBXWZHDQH6RANA5CNFSM4H4HA7S2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD53LM6I#issuecomment-527873657,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AMHS7FVSKMLWZ3DILWM2H5DQH6RANANCNFSM4H4HA7SQ
.

--
Thanks and Regards,
Anchu H. More
Data Engineer
SimpleWorks Solutions Pvt. Ltd.
No. 10/4, STPI, IT Park, Gayatri Nagar, Near VNIT College, Nagpur 440022
ISO 27001:2013 Certified
www.simplecrm.co http://www.simplecrm.com.sg/m.sg

Was this page helpful?
0 / 5 - 0 ratings

Related issues

huangl6 picture huangl6  Â·  6Comments

flozi00 picture flozi00  Â·  4Comments

Combinacijus picture Combinacijus  Â·  3Comments

palacinka picture palacinka  Â·  3Comments

NikolayTV picture NikolayTV  Â·  5Comments