Detect people/objects in a .JPG photo file?

Hello Fellow Rust enthusiasts !

I am new to Rust,
I am writing some software to process tens of thousands of .jpg photos taken by my family Android and iPhone over several years.

I am wondering if there are any Rust or C/C++ FFI libraries which I can use to be able to detect if a given object or a person are found inside a given .jpg file?
For example: a church, bottle of wine, person, etc?
I guess I can call it tagging or classifying a jpg file.

thank you very much in advance!

sounds like you need some kind of object recognition neural net, maybe even with custom object categories. there's this website tracking the state of the rust deep learning ecosystem, but honestly, i think you'd be much better off approaching something like that in python with keras/tensorflow or pytorch. This is likely not a problem where rust can shine.

1 Like

thank you for the reply! Can I call those Python libraries from Rust perhaps? I wonder if they are written in C/C++ so perhaps I can use FFI from Rust into those libraries?

you can call python from rust using pyo3. tensorflow and pytorch are both written in c++/python/cuda.

bindings for tensorflow
apparently there are also bindings for pytorch:

but again, i don't think using rust for this is a good approach. things will not get faster, safer or easier by bringing rust into this.

1 Like

thank you very much!
I will check this out - if I learn more about Rust as a result of this integration effort, it will still be beneficial to me.

1 Like

fair point. have fun :slight_smile:

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.