Skip to content

Instantly share code, notes, and snippets.

Avatar

welchi welchi

View GitHub Profile
View object_detection_page.dart
import 'package:camera/camera.dart';
import 'package:flutter/material.dart';
import 'package:flutter_hooks/flutter_hooks.dart';
import 'package:flutter_object_detection_example/data/entity/recognition.dart';
import 'package:flutter_object_detection_example/data/model/ml_camera.dart';
import 'package:hooks_riverpod/hooks_riverpod.dart';
class ObjectDetectionPage extends HookWidget {
static String routeName = '/object_detection';
@override
View ml_camera.dart
import 'dart:io';
import 'package:camera/camera.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter_object_detection_example/data/entity/recognition.dart';
import 'package:flutter_object_detection_example/data/model/classifier.dart';
import 'package:flutter_object_detection_example/util/image_utils.dart';
import 'package:hooks_riverpod/hooks_riverpod.dart';
import 'package:image/image.dart' as image_lib;
@welchi
welchi / classifier.dart
Created Dec 16, 2020
object detection classifier
View classifier.dart
import 'dart:math';
import 'package:flutter_object_detection_example/data/entity/recognition.dart';
import 'package:flutter_object_detection_example/util/logger.dart';
import 'package:image/image.dart' as image_lib;
import 'package:tflite_flutter/tflite_flutter.dart';
import 'package:tflite_flutter_helper/tflite_flutter_helper.dart';
class Classifier {
Classifier({
@welchi
welchi / flutter_firebase_authentication_with_google_sign_in.dart
Created Nov 3, 2020
FirebaseAuthentication demo using Google Sign-in in Flutter.
View flutter_firebase_authentication_with_google_sign_in.dart
import 'package:firebase_auth/firebase_auth.dart';
import 'package:flutter/material.dart';
import 'package:flutter_signin_button/button_view.dart';
import 'package:flutter_signin_button/flutter_signin_button.dart';
import 'package:google_sign_in/google_sign_in.dart';
class SignInDemoApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
View MouthOpenParam.cs
using UnityEngine;
using Live2D.Cubism.Core;
public class MouthOpenParam : MonoBehaviour
{
[SerializeField] DlibWebCamFaceDetector faceDetector;
[SerializeField] CubismParameter mouthOpenParameterX;
[SerializeField] CubismParameter mouthOpenParameterY;
[SerializeField] float lerpT = 0.2f;
View FrontalFaceParam.cs
using UnityEngine;
using System;
using System.Collections.Generic;
using Live2D.Cubism.Core;
using OpenCVForUnity.CoreModule;
using OpenCVForUnity.Calib3dModule;
using OpenCVForUnity.UnityUtils;
public class FrontalFaceParam : MonoBehaviour
{
View DlibWebCamFaceDetector.cs
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using DlibFaceLandmarkDetector;
using DlibFaceLandmarkDetector.UnityUtils;
public class DlibWebCamFaceDetector : MonoBehaviour
{