This repository is the byproduct of the Gorillatracker Bachelors Project 2023/2024 at HPI. It can be used for easily training computer vision models supervised aswell as self supervised.
git clone https://github.com/joschaSchroff/gorillatracker.git
docker build -t gorillatracker:latest .
Install VS-Code devcontainer extension
Ensure the following directories and files exist, and verify that the correct paths are set in your devcontainer.json file:
.ssh.cache
.netrc.gitconfig
- Open the project in Visual Studio Code.
- Use the Command Palette (
Ctrl+Shift+PorCmd+Shift+Pon macOS) and select:Dev Containers: Reopen in Container.
- Wait for the container to build and start. Once completed, your environment will be ready for development.
You can prevent readding your git name and email after devcontainer rebuild by
placing them in a .gitconfig. It will not be commited to remote.
[user]
name = Your Name
email = some.body@student.hpi.de
-
Create a Dataset that supports getitem(self, idx: int) (read: single element access) in
gorillatracker.datasets.<name>.py.
If you need to do custom transformations (except resizing), you can also declare a classmethodget_transforms(cls). -
Select the dataset from your cfgs/.yml
dataset_class.
You can now use the dataset for online and offline triplet loss. All the sampling for triplet generation is ready build.
The model class should many apply a Resize to it's expected size and if needed enforce number of channels needed.
The dataset class should specify all other transforms and MUST at least transform torchvision.transforms.ToTensor.
- make sure you have mounted the right gpu in devcontainer.json
- run:
python train.py --config_path cfgs/<yourconfigname>.yml
bash run-in-docker.sh -g [GPUs] python train.py --config_path cfgs/<yourconfigname>.yml
set up a json file(see examples in /sweep_configs) with the parameters you want to sweep over.
bash scripts/run-in-docker.sh -g [GPUs] python init_sweep.py --sweep_config_file sweep_configs/<yoursweepconfigname>.json
This project is licensed under the GNU Affero General Public License v3.0.
You are free to use, modify, and distribute this software under the terms of the AGPL-3.0. For more details, see the full LICENSE file.