Skip to content

Commit

Permalink
Create a proper setup system for others to use
Browse files Browse the repository at this point in the history
  • Loading branch information
humphd committed Oct 14, 2023
1 parent 68e288f commit 71dc02b
Show file tree
Hide file tree
Showing 10 changed files with 10,933 additions and 12 deletions.
3 changes: 2 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Project specific information for git
# telling it we always use Unix line endings

# Auto detect text files and perform LF normalization
* text=auto
# We store our ONNX models in git-lfs
*.onnx filter=lfs diff=lfs merge=lfs -text
9 changes: 3 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -154,11 +154,8 @@ cython_debug/
# Ignore video files
video/

# Ignore the yolo-fish model because it is too large
yolov4_1_3_608_608_static.onnx

# Ignore the megadetector model because it is to large
md_v5a_1_3_640_640_static.onnx

# Ignore Mac Finder files
.DS_Store

# Ingnore the .pixi/ folder for dependencies
.pixi/
3 changes: 2 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"recommendations": [
"streetsidesoftware.code-spell-checker",
"ms-python.black-formatter"
"ms-python.black-formatter",
"charliermarsh.ruff",
]
}
28 changes: 28 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,30 @@
# Automated Camera Trapping Identification and Organization Network (ACTION)

## Setup

Action is written in Python and requires a number of dependencies and large machine learning models (~778M) to be installed and downloaded.

The easiest way to use it is with the [pixi](https://prefix.dev/docs/pixi/overview) package manager. Pixi installs everything you need into a local `.pixi` folder (i.e., at the root of the project), without needing to modify your system.

1. [Clone](https://github.com/humphrem/action.git) this repo using `git`
2. [Install pixi](https://prefix.dev/docs/pixi/overview#installation)
3. Start a terminal and navigate to the root of the Action project folder, `cd action`
4. Enter the command `pixi run setup` to download, install, and setup everything you'll need

## Using Action

### Pixi Shell

Each time you want to use Action, you need to open a terminal and navigate to the Action folder, then start a shell with `pixi`:

```sh
pixi shell
```

This will make all of the dependencies installed with `pixi run setup` available.

You can exit the pixi shell by using:

```sh
exit
```
4 changes: 2 additions & 2 deletions megadetector_detector.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@

from base_detector import BaseDetector

# The Megadetector ONNX model should be in the same directory as this file
megadetector_model_path = "md_v5a_1_3_640_640_static.onnx"
# The Megadetector ONNX model should be in the ./models directory and needs to be pulled with git-lfs
megadetector_model_path = "models/md_v5a_1_3_640_640_static.onnx"
# Input images should be 640 x 640
megadetector_image_width = 640
megadetector_image_height = 640
Expand Down
Loading

0 comments on commit 71dc02b

Please sign in to comment.