Skip to content

Flutter package for CutOut image segmentation implementation that enables the utilization of C++ code for image processing.

License

Notifications You must be signed in to change notification settings

grandeclip/cutout_flutter

Repository files navigation

CutOut

Overview

Flutter package for CutOut image segmentation implementation that enables the utilization of C++ code for image processing. This package provides a bridge between Flutter and native C++ image segmentation models, offering efficient and high-performance image segmentation capabilities in Flutter applications. The integration of C++ code allows developers to leverage existing computer vision algorithms while maintaining the cross-platform benefits of Flutter. Currently, supports iOS and Android.

Key Features

  • Supports latest OpenCV 4.10.0
  • Supports ONNXRuntime 1.15.1 (depends on onnxruntime_flutter 1.4.1)
  • Enables conversion and utilization of Python code from research or POC projects to C++
  • Supports major segmentation models including U2Net and Segment Anything(SAM)

Getting Started

dependencies:
  cutout: x.y.z

Build for iOS and Android packages

  • iOS

    cd ${YOUR_APPLICATION}/ios && pod install
  • Android

    cd ${YOUR_APPLICATION}/android && ./gradlew clean

Download models

You can use example models or download them models assets. The models in both locations are identical.

Update OpenCV version

Check out set_opencv.sh file. (ref. flutter_native_opencv)

Usage Example

Check out example directory.

Licenses

This package is licensed under the Apache License, Version 2.0. This package includes the following third-party models: