Software, algorithms and research related to the Automated Monitoring of Insects using deep learning and other machine learning methods.
|
|
|
|
uv is used to manage the dependencies common to all scripts and sub-projects. uv is a fast, modern Python package manager.
- Install uv
# On macOS and Linux curl -LsSf https://astral.sh/uv/install.sh | sh # On Windows powershell -c "irm https://astral.sh/uv/install.ps1 | iex"
- Clone this repository
- Create a
.envor copy.env.exampleand update the values - Install dependencies in the root of the repository (
--extra devadds the development tools, including pre-commit):uv sync --extra dev
- Install pre-commit hooks:
uv run pre-commit install
An optional way to setup the environment is to use Conda for creating and managing the Python environment, while using uv for managing the packages and dependencies.
- Install Conda
- Create conda environment using the
environment.yml:conda env create -f environment.yml - Activate the conda environment:
conda activate ami-ml - Install packages in the root of the repository using uv:
uv sync
Activate the virtual environment before running scripts
source .venv/bin/activate # On Linux/macOS
# or, on Windows PowerShell
.\.venv\Scripts\Activate.ps1Example for running a script (in the activated environment):
python src/localization/inference_localization.py \
--data_dir ~/TRAPIMAGES/Sample/ \
--ckpt_path ~/Downloads/fasterrcnn_mobilenet_v3_large_fpn_uqfh7u9w.pt \
--model_type fasterrcnn_mobilenet_v3_large_fpnAlternatively, one can run scripts without activating the environment:
uv run python <script>uv run automatically uses the project's virtual environment, so there is no need to activate it first.



