mlkit_demo
mlkit_demo copied to clipboard
dependencies error
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
same issue as @josephh24 noticed. Tried to download your branch of firebase, but can't find FirebaseVisionImage.fromBytes(...
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
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) {
i see the error but i'm not sure how to fix it
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
it works the only thing is that the interface is just white
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.
It does not work, it does not change the state of the emoji, I think something is wrong
_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 :)
i can't make it work, but it is debugging
there is exception coming from firebase making this : _isDetecting = false to never execute
@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.
I hope someone finds a way to fix it
@josephh24 see issue #4. issue resolved.
@rai2270 thank you it is working :)