mlkit_demo icon indicating copy to clipboard operation
mlkit_demo copied to clipboard

dependencies error

Open josephh24 opened this issue 5 years ago • 15 comments

Git error. Command: git rev-list --max-count=1 demo_all fatal: ambiguous argument 'demo_all': unknown revision or path not in the working tree. Use '--' to separate paths from revisions, like this: 'git [...] -- [...]'

josephh24 avatar Dec 08 '18 19:12 josephh24

same issue as @josephh24 noticed. Tried to download your branch of firebase, but can't find FirebaseVisionImage.fromBytes(...

rai2270 avatar Dec 08 '18 20:12 rai2270

ok, so this one seems good: just need to change from demo_all -> mlkit_android_2 and demo_all -> camera_android_2 :

firebase_ml_vision: git: url: git://github.com/bparrishMines/plugins.git path: packages/firebase_ml_vision ref: mlkit_android_2

camera: git: url: git://github.com/bparrishMines/plugins.git path: packages/camera ref: camera_android_2

rai2270 avatar Dec 08 '18 21:12 rai2270

After adjust pubspec.yaml above. Some tiny compile issue: Compiler message: lib/face_expression_reader.dart:44:35: Error: The argument type '(dart.typed_data::Uint8List) → dart.core::Null' can't be assigned to the parameter type '(#lib1::CameraImage) → void'. Try changing the type of the parameter, or casting the argument to '(#lib1::CameraImage) → void'. _controller.startByteStream((Uint8List bytes) {

rai2270 avatar Dec 08 '18 21:12 rai2270

i see the error but i'm not sure how to fix it

josephh24 avatar Dec 08 '18 21:12 josephh24

Maybe this:

_controller = new CameraController(frontCamera, ResolutionPreset.medium);
_controller.initialize().then((_) {
  _controller.startByteStream((CameraImage image) {

not sure yet how you convert image to Uint8List for _runDetection

rai2270 avatar Dec 08 '18 21:12 rai2270

it works the only thing is that the interface is just white

josephh24 avatar Dec 08 '18 22:12 josephh24

CameraImage -> Uint8List bytes -> _runDetection : you are able to convert the CameraImage to bytes?

CameraImage has planes, and each got Uint8List bytes , but not sure how that conversion supposed to happened.

rai2270 avatar Dec 08 '18 22:12 rai2270

It does not work, it does not change the state of the emoji, I think something is wrong

josephh24 avatar Dec 08 '18 23:12 josephh24

_controller = new CameraController(frontCamera, ResolutionPreset.medium);
_controller.initialize().then((_) {
  _controller.startByteStream((CameraImage image) {
    if (!_isDetecting) {
      _isDetecting = true;
      _runDetection(image.planes.single.bytes);
    }
  });
});

I tried the above. not working , but still debugging :)

rai2270 avatar Dec 08 '18 23:12 rai2270

i can't make it work, but it is debugging

josephh24 avatar Dec 08 '18 23:12 josephh24

there is exception coming from firebase making this : _isDetecting = false to never execute

rai2270 avatar Dec 09 '18 00:12 rai2270

@josephh24 I've put the reason why it's not building/running in the open issue. hopefully we'll get the conversion from CameraImage to bytes and then the demo can work.

rai2270 avatar Dec 09 '18 23:12 rai2270

I hope someone finds a way to fix it

josephh24 avatar Dec 10 '18 04:12 josephh24

@josephh24 see issue #4. issue resolved.

rai2270 avatar Dec 11 '18 01:12 rai2270

@rai2270 thank you it is working :)

josephh24 avatar Dec 11 '18 02:12 josephh24