Last active
March 21, 2022 07:40
-
-
Save OlafenwaMoses/7b9745d8111f411d15ec6372e273b205 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from imageai.Classification.Custom import CustomImageClassification | |
import os | |
execution_path = os.getcwd() | |
prediction = CustomImageClassification() | |
prediction.setModelTypeAsResNet50() | |
prediction.setModelPath("idenprof_061-0.7933.h5") | |
prediction.setJsonPath("idenprof_model_class.json") | |
prediction.loadModel(num_objects=10) | |
predictions, probabilities = prediction.predictImage("image.jpg", result_count=3) | |
for eachPrediction, eachProbability in zip(predictions, probabilities): | |
print(eachPrediction , " : " , eachProbability) |
ModuleNotFoundError: No module named 'imageai'
You need setup.
https://imageai.readthedocs.io/en/latest/
ModuleNotFoundError: No module named 'imageai'
pip3 install imageai
ModuleNotFoundError: No module named 'imageai'
pip install imageai --upgrade
just run this and after that run your code.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ModuleNotFoundError: No module named 'imageai'