object_detection_flutter icon indicating copy to clipboard operation
object_detection_flutter copied to clipboard

Shrunken Image after Migrating TFLite packages

Open mlopez0 opened this issue 3 years ago • 3 comments

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

mlopez0 avatar Dec 02 '21 13:12 mlopez0

I had the same issue!

bitsdominicada avatar Dec 15 '21 22:12 bitsdominicada

has anyone been able to fix this? 🙂

mlopez0 avatar Feb 21 '22 13:02 mlopez0

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.

cuzyoucant avatar Aug 07 '22 10:08 cuzyoucant