identity_document_detection 0.0.1 copy "identity_document_detection: ^0.0.1" to clipboard
identity_document_detection: ^0.0.1 copied to clipboard

discontinued
PlatformAndroidiOS

Use tensor flow lite for detect identity documents on mobile devices

Identity Document Detection #

Use tensor flow lite for detect identity documents on mobile devices

Platform Support #

NOTE: The package maybe add support on future.

Android iOS macOS Windows Linux
Support

Features #

Use this plugin in your Flutter app to:

  • Not required network connection.
  • Run on single image and real time.
  • Detect type of a card.
  • Detect side of document.
  • Detect position on image.

on future must detect brightness and sharpness

Getting started #

  1. Add identity_document_detection to your pubspec.yaml:

    dependencies:
      identity_document_detection: latest_version
    
  2. Run flutter pub get to install.

Usage #

You have 2 ways to use it:

  1. Using the IdentityDetector widget
class DetectorPage extends StatelessWidget {
  const DetectorPage({super.key});

  @override
  Widget build(BuildContext context) {
    return Center(
      child: IdentityDetector(
        options: IDOptions(
          confidence: 0.85,
          detection: IDTypeDetection.multiple,
          onDocumentDetect: (recognitions) {
            // TODO: Add your own logic here
          },
        ),
      ),
    );
  }
}
  1. Creating IDController and initializing it
final detector = await IDController.initialize(widget.options);
_detector = detector;
_subscription = detector.stream.listen((values) {
  final painter = ObjectDetectorPainter(values);
  _customPaint = CustomPaint(painter: painter);
  setState(() {});
});

Callback to receive each frame CameraImage perform inference on it

void onImageAvailable(CameraImage cameraImage) async {
  _detector?.processFrame(cameraImage);
}

And for dispose you should use

_detector?.stop();

Important

For now the package adds a high weight to the project, it must be taken into consideration when taking it to stores, this will improve in the future.

Coming soon #

  • Detect brightness on image.
  • Detect sharpness on document.
3
likes
130
points
40
downloads

Publisher

verified publisherdiegoyanguam.fun

Weekly Downloads

Use tensor flow lite for detect identity documents on mobile devices

Repository (GitHub)

Documentation

API reference

License

Unlicense (license)

Dependencies

camera, exif, flutter, image, path_provider, tflite_flutter

More

Packages that depend on identity_document_detection