loadModel method
Loads the YOLO model for inference.
This method must be called before predict to initialize the model.
Returns true if the model was loaded successfully, false otherwise.
Example:
bool success = await yolo.loadModel();
if (success) {
print('Model loaded successfully');
} else {
print('Failed to load model');
}
throws ModelLoadingException if the model file cannot be found
Implementation
Future<bool> loadModel() async {
final success = await _modelManager.loadModel();
if (success) {
_isInitialized = true;
}
return success;
}