object_detection_flutter
object_detection_flutter copied to clipboard
Shrunken Image after Migrating TFLite packages
Hi,
I recently migrated the TensorFlow lite packages to the lates version and I noticed this issue.
On the camera_view.dart
cameraController = CameraController(cameras[0], ResolutionPreset.low, enableAudio: false);
cameraController = CameraController(cameras[0], ResolutionPreset.medium, enableAudio: false);
cameraController = CameraController(cameras[0], ResolutionPreset.high, enableAudio: false);
The updated pubspec.yaml
camera: ^0.8.1+3
tflite_flutter: ^0.9.0
tflite_flutter_helper: ^0.3.0
image: ^3.0.8
path_provider: ^2.0.1
image_picker: ^0.7.3
I had the same issue!
has anyone been able to fix this? 🙂
If anyone is still looking for a solution,
In camera_view.dart, build method change
return AspectRatio( aspectRatio: cameraController.value.aspectRatio, child: CameraPreview(cameraController));
to
return CameraPreview(cameraController);
I dont know if there is a better solution, or why it broke in the first place, but it works for me.