Se ha denunciado esta presentación.
Utilizamos tu perfil de LinkedIn y tus datos de actividad para personalizar los anuncios y mostrarte publicidad más relevante. Puedes cambiar tus preferencias de publicidad en cualquier momento.

io 19 extended android flutter&mlkit

423 visualizaciones

Publicado el

2019 I/O extended Android 에서 발표한 Flutter ❤️ML Kit 발표자료입니다.

Publicado en: Móvil
  • Sé el primero en comentar

io 19 extended android flutter&mlkit

  1. 1. Flu$er ❤ ML Kit
  2. 2. Flu$er ❤ ML Kit 조성윤 ParkingBrother CTO GDG Busan Organizer @extJo
  3. 3. 개발 하다 보면 힘든 점? Android iOS Web Desktop
  4. 4. Flu$er? ML Kit?
  5. 5. SDK for Mobile App based on DaC language Flu$er is…
  6. 6. Flu$er has… Built-in beautiful Material Design and CupeCino widget, rich motion APIs, smooth natural scrolling, and plaJorm awareness
  7. 7. Flu$er has… Develop iOS and Android App with single code base
  8. 8. Flu$er developed on… The Fastest growing language DaC 싫어하지 마세요 ㅠㅠ DaC 2.0 좋습니다
  9. 9. Everything is Widget
  10. 10. Declarative UI // Imperative style b.setColor(red) b.clearChildren() ViewC c3 = new ViewC(...) b.add(c3) // Declarative style return ViewB( color: red, child: ViewC(...), )
  11. 11. Native Binary Code Canvas Events Flutter Application Service Location Camera Bluetooth Sensors Platform Channels Flutter Widgets Material Design Cupertino
  12. 12. Android iOS Web (Technical Preview) Desktop
  13. 13. Android iOS Web (Technical Preview) Desktop
  14. 14. Do You Know…? Open CV Object Detection RNN CNN Face Detection NLP GAN 그거 인공지능으로 하면 되지않나요? 다른데도 다 하던데…
  15. 15. • Text Recognition - OCR • Face Detection • Barcode Scan • Label Images (Cloud) • Landmark Detection (Cloud) Vision • Identify the language of text (Cloud) • Generate SmaC replies (Cloud) Natural Language • Use Custom Model • Use custom TensorFlow Lite Build Custom Model
  16. 16. • Text Recognition - OCR • Face Detection • Barcode Scan • Label Images (Cloud) • Landmark Detection (Cloud) Vision • Identify the language of text (Cloud) • Generate SmaC replies (Cloud) Natural Language • Use Custom Model • Use custom TensorFlow Lite Build Custom Model
  17. 17. Let’s Do This 😎
  18. 18. extended Camera Module Firebase ML Vision
  19. 19. extended dependencies: u]er: sdk: u]er camera: ^0.5.1 arebase_ml_vision: ^0.7.0 pubspec.yaml
  20. 20. extended Firebase Se$ing…😅
  21. 21. extended void main() => runApp(MaterialApp(home: MLKitSamplePage())); class MLKitSamplePage extends StatefulWidget { @override MLKitSampleState createState() => MLKitSampleState(); } class MLKitSampleState extends State<MLKitSamplePage> { ... }
  22. 22. extended void _initializeCamera() async { CameraDescription description = await getCamera(_direction); ImageRotation rotation = rotationIntToImageRotation( description.sensorOrientation, ); _cameraController = CameraController( description, ResolutionPreset.medium, ); await _cameraController.initialize(); … }
  23. 23. extended @override Widget build(BuildContext context) { return Scakold( appBar: AppBar( title: const Text('Flu]er ❤ ML Kit'), ), body: _buildImage(), oatingActionBu]on: FloatingActionBu]on( onPressed: _toggleCameraDirection, child: _direction == CameraLensDirection.back ? const Icon(Icons.camera_front) : const Icon(Icons.camera_rear), ), ); }
  24. 24. extended Widget _buildPopUpMenuBu]on() { return PopupMenuBu]on<Detector>( onSelected: ... itemBuilder: (BuildContext context) => <PopupMenuEntry<Detector>>[ const PopupMenuItem<Detector>( child: Text('Detect Face'), value: Detector.face, ), const PopupMenuItem<Detector>( child: Text('Detect Text'), value: Detector.text, ), ], ); }
  25. 25. extended @override Widget build(BuildContext context) { return Scakold( appBar: AppBar( title: const Text('Flu]er ❤ ML Kit'), actions: <Widget>[ _buildPopUpMenuBu]on() ], ), ... ); }
  26. 26. extended HandleDetection _getDetectionMethod() { anal FirebaseVision mlVision = FirebaseVision.instance; switch (_currentDetector) { case Detector.text: return mlVision.textRecognizer().processImage; default: asseC(_currentDetector == Detector.face); return mlVision.faceDetector().processImage; } }
  27. 27. extended Future<dynamic> detect( CameraImage image, HandleDetection handleDetection, ImageRotation rotation, ) async { return handleDetection( FirebaseVisionImage.fromBytes( concatenatePlanes(image.planes), buildMetaData(image, rotation), ), ); }
  28. 28. extended void _staCImageDetect(ImageRotation rotation) { _cameraController.staCImageStream((CameraImage image) { if (_isDetecting) return; _isDetecting = true; detect(image, _getDetectionMethod(), rotation).then( (dynamic result) { setState(() { _scanResults = result; }); … }
  29. 29. extended class FaceDetectorPainter extends CustomPainter { … @override void paint(Canvas canvas, Size size) { anal Paint paint = Paint() ..style = PaintingStyle.stroke ..strokeWidth = 2.0 ..color = Colors.red; for (Face face in faces) { canvas.drawRect( … … }
  30. 30. extended class TextDetectorPainter extends CustomPainter { ... @override void paint(Canvas canvas, Size size) { anal Paint paint = Paint() ..style = PaintingStyle.stroke ..strokeWidth = 2.0; for (TextBlock block in visionText.blocks) { for (TextLine line in block.lines) { for (TextElement element in line.elements) { ... ... }
  31. 31. extended 🤩 Demo 🤩
  32. 32. extended Less Code More Functions
  33. 33. Thank You 😎 조성윤 ParkingBrother CTO GDG Busan Organizer @extJo

×