CamTrap Detector is wriiten in the Rust and JavaScript languages using the Tauri application framework.
Instructions for installing Rust can be found here.
Instructions for installing Node.js can be found here.
Assuming Git is installed, clone the repository:
git clone https://github.com/bencevans/camtrap-detector.git
cd camtrap-detector
Install the npm dependencies, this should be repeated each time any of the package.json
files are updated.
npm install
wget -O md_v5a.0.0-dynamic.onnx https://github.com/bencevans/megadetector-onnx/releases/download/v0.2.0/md_v5a.0.0-dynamic.onnx
To run the application in development mode, run:
npm run tauri dev
This will start the application in development mode, with reloading enabled, so any changes to the source code will be automatically reloaded.
To build the application, run:
npm run tauri build
This will build the application for the current platform. It's worth noting that the OpenCV library is not included in the build, meaning the user will need to install OpenCV separately. Alternatively OpenCV can be built statically so that it's included in the build. To do this, inspect the GitHub Actions workflow files for the build process.
To run the frontend lint tests, run:
npm run lint
To run the backend tests, run:
cargo test
Please note that the backend tests require the md_v5a.0.0-dynamic.onnx
model to be present in the root of the repository.