Open Dentrax opened 5 years ago
That's possible, but currently not a priority since I'm consuming the library from rust in sn0int. To use this library with python you would need to wrap it into a C FFI api, compile it to a .so
and then write a python wrapper. You can find a helper library over here: https://github.com/rochacbruno/rust-python-example
@kpcyrd Is it works if i extern this function to Python?
It sort of depends how much of the api you want to access. Usually you would need:
Note that you also need an image-rs object. If you want to make it as simple as possible and you only need the true/false info you can export a function like this:
fn is_nude(path: &str) -> Result<bool> {
let img = image::open(path);
nude::scan(&img).is_nude()
}
Hey, @kpcyrd
Thanks for the project. Rust implementation is really really fast than Python. I wonder something. How I use this project in the Python?
Like this:
Thank you!