Skip to content

dnanhkhoa/rust-background-removal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🦀 Background Removal

Example

This Rust implementation is a minimal port of the original JavaScript library @imgly/background-removal. 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 here.

Update: For the technical details of the model, please check out the paper Highly Accurate Dichotomous Image Segmentation mentioned in this repository.

Usage

# 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

Related sites

pykeio/ort: A Rust wrapper for ONNX Runtime

Credits

Khoa Duong, David Horner