++========================
==========================
Contact: kalfasyan@gmail.com , ioannis.kalfas@kuleuven.be
The PhotoBox device itself was built by Frank Mathijs at KU Leuven (frank.mathijs@kuleuven.be)
- Handles imaging sessions
- Capture a sticky plate image
- Spatial (applied) and color calibration (available).
- Cropping.
- Object detection on the captured image.
- Model inference on detected objects/insects.
- Validation procedure for entomology experts.
- Exporting all results in csv files.
- Creating plots with insect counts.
- Works on both a Raspberry Pi and any PC.
- First install
pcmanfm
file manager by running this in your terminal:
sudo apt-get update -y
sudo apt-get install -y pcmanfm
- Install the
photobox
package :
pip install photobox
- Clone this repository and download the model (unskilled model shared for demo purposes) in the photobox folder - same dir as
photobox_app.py
. - From that directory run:
python photobox_app.py
Here is an overview of the buttons' functionality:
The software removes spatial distortion, crops and then thresholds the image to detect objects (insects). One could improve this step by adding a smart object detector, however this software was initially implemented for a Raspberry Pi and that would make it much slower.
A trained insect image classifier is fed with each insect image (150x150 pixels) and provides the user with the maximum probabilities per detection. Insects that do not belong to the "critical insect list" which is user-defined, are all shown in blue. For the "critical insects", a light green color is shown for the ones that the model showed a probability score > 75% and a red color for the rest.
The user is asked to verify each "critical-insect" detection and then save the results. The session folder will then contain csv files and histogram plots with the counts per sticky plate.
A newer PhotoBox version is under development. It is a more portable device that uses a smartphone to take images of sticky plates inside a smaller box which is illuminated by the phone's flash.
This new photobox comes with a Streamlit web interface to perform all functions that are available in the present repository.
More details will be available in a new repository.
All data in this repo belong to KU Leuven.