I'm trying to run custom model for label_detector use case on top of CamerAwesome package, but I got this error :
The input tensor should have dimensions 1 x height x width x 3. Got 1 x 3 x 416 x 416., null)
the implementation of onImageForAnalysis is
onImageForAnalysis: (img) => _analyzeImage(img),
Future _analyzeImage(AnalysisImage img) async {
final inputImage = img.toInputImage();
try {
// probably something to do here to convert image from 1 x 3 x 416 x 416 to 1 x 416 x 416 x 3
// but I don't know how !!!
processImage(inputImage);
} catch (error) {
debugPrint("...sending image resulted error $error");
}
}
Future<void> processImage(InputImage inputImage) async {
if (!_canProcess) return;
if (_isBusy) return;
_isBusy = true;
setState(() {
_text = '';
});
final labels = await _imageLabeler.processImage(inputImage);
print(labels.toString());
_isBusy = false;
if (mounted) {
setState(() {});
}
}
I know that this is not related to CamerAwesome but any pointer will be appreciated
I'm trying to run custom model for label_detector use case on top of CamerAwesome package, but I got this error : The input tensor should have dimensions 1 x height x width x 3. Got 1 x 3 x 416 x 416., null)
the implementation of onImageForAnalysis is
I know that this is not related to CamerAwesome but any pointer will be appreciated