Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dnanhkhoa/rust-background-removal
Remove backgrounds from images with ease
https://github.com/dnanhkhoa/rust-background-removal
background-removal image-matting image-processing image-segmentation onnx onnxruntime open-source rust
Last synced: about 1 month ago
JSON representation
Remove backgrounds from images with ease
- Host: GitHub
- URL: https://github.com/dnanhkhoa/rust-background-removal
- Owner: dnanhkhoa
- License: mit
- Created: 2023-09-13T14:34:07.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-08-13T23:41:04.000Z (6 months ago)
- Last Synced: 2024-08-14T02:06:41.069Z (6 months ago)
- Topics: background-removal, image-matting, image-processing, image-segmentation, onnx, onnxruntime, open-source, rust
- Language: Rust
- Homepage:
- Size: 4.53 MB
- Stars: 24
- Watchers: 1
- Forks: 9
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 🦀 Background Removal
![Example](images/example.png)
This Rust implementation is a minimal port of the original JavaScript library [@imgly/background-removal](https://github.com/imgly/background-removal-js). It aims to explore **the use of ONNX models in Rust** for background removal tasks. If you're interested in the full capabilities and details of the background removal process, I highly recommend checking out the original JavaScript library's [README](https://github.com/imgly/background-removal-js) here.
**Update:** For the technical details of the model, please check out the paper **Highly Accurate Dichotomous Image Segmentation** mentioned in [this repository](https://github.com/xuebinqin/DIS).
## Usage
```sh
# Download all pretrained models
./download_models.sh# Update variable input_img_file in src/main.rs
# Run the program
cargo run --release
```## Limitations
The model resolution is limited to a maximum of 1024x1024 pixels.
## License
[MIT](https://choosealicense.com/licenses/mit/)
## Related sites
[pykeio/ort: A Rust wrapper for ONNX Runtime](https://github.com/pykeio/ort)
## Credits
Khoa Duong, David Horner