/megadetector-gui

A desktop application that makes using MegaDetector's model easier

Primary LanguageJavaScript

MegaDetector GUI

AI-assisted Tool for Sorting Camera Trap Images

Based on MegaDetector



Buy Me A Coffee

Introduction

The aim of this project is to provide a simple, easy to use, application that enables field scientists to quickly sort through camera trap images. Camera traps are often set off by moving leaves and consequentlly take lots of empty shots. Weeding out empty images is a mundane task that would typically take several hours of sorting through hundreds of images.

Using machine learning we can reduce the time it takes to sort these images by making use of object detection. This application categorises your images in folders depending on what it thinks it has detected.

Installation

The only currently supported platform is Windows (64-bit).

Go to the Releases page and download the provided installer for the latest available version.

GPU Support

Read the instructions here on how to enable significantly faster processing.

Features

  • automatic detection of animals in a set of photos
  • review process that allows you to correct the results of the automatic detection
  • zoom-and-pan feature on photos during review to help spot animals
  • automatically move the images in labelled folders
  • detailed documentation on how to use the application
  • ability to train and use custom models
  • in-app labelling
  • upload photos to a database of your choice

Contributing

Tech Stack

The app is built using ElectronJS. The UI framework is Svelte, and components are styled using Fomantic-UI

The brains of the app are in Python. I have adapted MegaDetector's code into a slightly more organised API. We use this API to build a basic CLI app that compiles to an executable. The executable is called by the Electron app whenever we need to use the model for inference.

Dev Installation & Running

If you wish to use this project for development purposes follow these steps:

Pre-requsites:

  1. Python 3.x
  2. Node.js

Steps:

  1. Clone this repository
  2. Install the depencies using npm install
  3. Build the Fomantic-UI CSS and JS: npm run semantic-build
  4. Build the backend executable:
    1. cd engine/
    2. Create a virtual environment
    3. Activate the virtual environment
    4. Install requirements: pip install -r requirements.txt
    5. Download the MegaDetector model from here
    6. Place the model file in the engine/models/ folder
    7. Build the .exe: pyinstaller -F cli_wrapper/cli.py

Running the application:

  1. To run the app in dev mode: npm run start
  2. To build the installer: npm run build