Skip to content

kalfasyan/photobox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

62 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

++========================

PhotoBox v0.0.3

==========================

Software author: Ioannis Kalfas

Role: PhD Researcher

Division: MeBioS, KU Leuven

The PhotoBox device itself was built by Frank Mathijs at KU Leuven (frank.mathijs@kuleuven.be)


img0

Features

  • 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.

Installation

  1. First install pcmanfm file manager by running this in your terminal:
    sudo apt-get update -y
    sudo apt-get install -y pcmanfm
  2. Install the photobox package :
    pip install photobox
  3. Clone this repository and download the model (unskilled model shared for demo purposes) in the photobox folder - same dir as photobox_app.py.
  4. From that directory run:
    python photobox_app.py

Workflow

1. GUI operations

Here is an overview of the buttons' functionality: img1

2. Object detection

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. img2

3. Model inference

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. img3

4. Human verification

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. img4

UPDATE

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.

DISCLAIMER


All data in this repo belong to KU Leuven.

Releases

No releases published

Packages

No packages published

Languages