Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/1_bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ assignees: ''
## Necessary Checks
<!--- Please ensure, you have completed the following checks. This helps to give insight into the issue and prevent already resolved issues. -->
- [ ] The issue occurred on the newest version
<!--- If installed manually, run: 'git pull && poetry install' -->
<!--- If installed manually, run: 'git pull && uv sync' -->
<!--- If installed via PIP, run: 'pip install --upgrade yoeo' -->
- [ ] I couldn't find a similar issue here on this project's github repo
- [ ] If the issue is CUDA related (CUDA error), I have tested and provided the traceback also when CUDA is turned off <!--- For linux, rerun your steps with the prefix CUDA_VISIBLE_DEVICES="" -->
Expand Down
2 changes: 1 addition & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<!--- If fixing a bug, there should be an issue describing it with steps to reproduce -->

## Necessary checks
- [ ] Update poetry package version [semantically](https://semver.org/)
- [ ] Update package version [semantically](https://semver.org/)
- [ ] Write documentation
- [ ] Create issues for future work
- [ ] Test on your machine
19 changes: 9 additions & 10 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,33 +11,32 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Install Poetry
run: pipx install poetry
- name: Install uv
uses: astral-sh/setup-uv@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.x
cache: "poetry"

- name: Install Dependencies
run: poetry install --with dev
run: uv sync --group dev

# Prints the help pages of all scripts to see if the imports etc. work
- name: Test the help pages
run: |
poetry run yoeo-train -h
poetry run yoeo-test -h
poetry run yoeo-detect -h
uv run yoeo-train -h
uv run yoeo-test -h
uv run yoeo-detect -h

- name: Demo Training
run: poetry run yoeo-train --data config/custom.data --epochs 30
run: uv run yoeo-train --data config/custom.data --epochs 30

- name: Demo Evaluate
run: poetry run yoeo-test --data config/custom.data --weights checkpoints/yoeo_checkpoint_29.pth
run: uv run yoeo-test --data config/custom.data --weights checkpoints/yoeo_checkpoint_29.pth

- name: Demo Detect
run: poetry run yoeo-detect --batch_size 2 --weights checkpoints/yoeo_checkpoint_29.pth
run: uv run yoeo-detect --batch_size 2 --weights checkpoints/yoeo_checkpoint_29.pth

linter:
runs-on: ubuntu-22.04
Expand Down
26 changes: 13 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@ This project is based upon [PyTorch-YOLOv3](https://github.com/eriklindernoren/P
## Installation
### Installing from source

For normal training and evaluation we recommend installing the package from source using a poetry virtual environment.
For normal training and evaluation we recommend installing the package from source using a uv virtual environment.

```bash
git clone https://github.com/bit-bots/YOEO
cd YOEO/
pip3 install poetry --user
poetry install
curl -LsSf https://astral.sh/uv/install.sh | sh
uv sync
```

You need to join the virtual environment by running `poetry shell` in this directory before running any of the following commands without the `poetry run` prefix.
Also have a look at the other installing method, if you want to use the commands everywhere without opening a poetry-shell.
You need to join the virtual environment by running `source .venv/bin/activate` in this directory before running any of the following commands without the `uv run` prefix.
Also have a look at the other installing method, if you want to use the commands everywhere without activating the virtual environment.

#### Download pretrained weights

Expand All @@ -36,20 +36,20 @@ Evaluates the model on the test dataset.
See help page for more details.

```bash
poetry run yoeo-test -h
uv run yoeo-test -h
```

## Inference
Uses pretrained weights to make predictions on images.

```bash
poetry run yoeo-detect --images data/samples/
uv run yoeo-detect --images data/samples/
```

<p align="center"><img src="https://user-images.githubusercontent.com/15075613/131503350-3e232e91-016b-4034-8bda-15e6619b0f98.png" width="480"\></p>

## Train
For argument descriptions have a look at `poetry run yoeo-train --h`
For argument descriptions have a look at `uv run yoeo-train --h`

#### Tensorboard
Track training progress in Tensorboard:
Expand All @@ -58,7 +58,7 @@ Track training progress in Tensorboard:
* Go to http://localhost:6006/

```bash
poetry run tensorboard --logdir='logs' --port=6006
uv run tensorboard --logdir='logs' --port=6006
```

Storing the logs on a slow drive possibly leads to a significant training speed decrease.
Expand All @@ -73,7 +73,7 @@ Add class names to `data/custom/yoeo_names.yaml`.
Run the following command to adapt the model file (cfg) to the new number of classes:

```bash
poetry run yoeo-custiomize-cfg -c config/yoeo.cfg -d config/custom.data -o config/yoeo-custom.cfg
uv run yoeo-custiomize-cfg -c config/yoeo.cfg -d config/custom.data -o config/yoeo-custom.cfg
```

This changes the layers of the model to fit the number of classes in your dataset.
Expand All @@ -94,7 +94,7 @@ In `data/custom/train.txt` and `data/custom/valid.txt`, add paths to images that
To train on the custom dataset run:

```bash
poetry run yoeo-train --model config/yoeo-custom.cfg --data config/custom.data
uv run yoeo-train --model config/yoeo-custom.cfg --data config/custom.data
```

## API
Expand Down Expand Up @@ -138,7 +138,7 @@ For more advanced usage look at the method's doc strings.
To convert your YOEO model to an ONNX model, you can use the following command:

```bash
poetry run yoeo-to-onnx config/yoeo.cfg # Replace path with your .cfg file
uv run yoeo-to-onnx config/yoeo.cfg # Replace path with your .cfg file
```

For more information on ONNX, read the [ONNX runtime website](https://onnxruntime.ai/).
Expand All @@ -148,7 +148,7 @@ For more information on ONNX, read the [ONNX runtime website](https://onnxruntim
After successful conversion of your YOEO model to an ONNX model using [this guide](#convert-your-yoeo-model-to-an-onnx-model), you can move on with the next conversion to an OpenVino IR model (intermediate representation) model using the following command:

```bash
poetry run yoeo-onnx-to-openvino config/yoeo.onnx # Replace path with your .onnx file
uv run yoeo-onnx-to-openvino config/yoeo.onnx # Replace path with your .onnx file
```

For more information on OpenVino, read the [OpenVino documentation](https://docs.openvino.ai).
Expand Down
Loading
Loading