image_background_remover
2.0.1, released 4 months ago by an unverified publisher
Removes backgrounds from images offline using an ONNX machine learning model.
What it does
Processes image byte data locally using an on-device ONNX machine learning model to remove backgrounds without relying on any external APIs. It also provides options for adjusting thresholds, edge enhancement, and adding custom background colors.
AI-written summary of version 2.0.1, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to remove image backgrounds completely offline on-device.
- You want privacy and reliability without cloud-based API costs.
Skip it when
- You are operating within Dart isolates, as the package requires main thread assets.
- You want to minimize app bundle size, as the embedded model adds around 30MB.
Strengths
- Works entirely offline without external API dependencies.
- Supports Android 16KB page size requirements.
- Provides customizable edge enhancement and background color composition.
Weaknesses
- Increases the application bundle size by approximately 30MB due to the bundled offline model.
- Cannot be used inside Dart isolates.
Setup
- Kind
- Flutter widgets
- Effort
- Medium
- Code generation
- No
- Direct dependencies
- 2
Requires configuring iOS Podfile for minimum iOS 16.0 and modifying Xcode build settings (Strip Linked Product to No) for release builds.
BackgroundRemover.instance.initializeOrt();
final result = await BackgroundRemover.instance.removeBg(imageBytes);
BackgroundRemover.instance.dispose();Alternatives
Packages that do the same job and could replace image_background_remover.
- image_cropper
A Flutter plugin for Android, iOS and Web supports cropping images
84Compare - image_pixels
Build widgets depending on image dimensions and pixel colors.
82Compare - fc_native_image_resize
A Flutter plugin to resize images via native APIs.
69Compare - simple_native_image_compress
Native image compression library supporting Windows, Linux, Android, iOS, and macOS.
48Compare
Works with
Packages commonly used together with image_background_remover: ones it builds on, ones built on it, and its own family.