-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Open
Description
Environment Details;
- OS: Windows 11
- Python Version: 3.12
- ImageAI Version: 3.0.3
- PyTorch Version: 2.5.1+cu118
Problem Description;
When attempting to load a custom-trained ResNet50 model using ImageAI's ImageClassification, the model fails to load with the error:
"Classification failed: Model not yet loaded. You need to call '.loadModel()' before performing image classification"
Reproduction Steps;
- Initialize ImageClassification
- Set model path using
setModelPath() - Set model type using
setModelTypeAsResNet50() - Call
loadModel()
Code Snippet;
from imageai.Classification import ImageClassification
classifier = ImageClassification()
classifier.setModelPath("path/to/model.pt")
classifier.setModelTypeAsResNet50()
classifier.loadModel() # Fails here
Additional Context;
Model trained using custom dataset
Model saved as '.pt' file
Attempting to use for image classification
Questions;
Does ImageAI support loading custom-trained models?
Are there specific model export requirements?
Metadata
Metadata
Assignees
Labels
No labels