kaylode/theseus
kaylode/theseus has 36 GitHub stars and 4 forks. GitHot measured 0 in 7 days. Last checked 2026-11-10 23:04 UTC. Last push 2026-10-11.
General template for most Pytorch projects
Measured star growth
- in 24h
- Update delayed
- in 7 days
- 0
- in 15 days
- Collecting history
- in 1 month
- Collecting history
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.md
Original:sailboat: Ship of Theseus
The ship wherein Theseus and the youth of Athens returned from Crete had thirty oars, and was preserved by the Athenians down even to the time of Demetrius Phalereus, for they took away the old planks as they decayed, putting in new and stronger timber in their places, insomuch that this ship became a standing example among the philosophers, for the logical question of things that grow; one side holding that the ship remained the same, and the other contending that it was not the same. — Plutarch, Theseus
:pencil: Instructions
Installation
- Create virtual environment:
conda create -n myenv python=3.10 - Install Pytorch. Currently support
torch==1.13.1 - Inside your project, install this package by
git+https://github.com/kaylode/theseus.git@master#egg=theseus[cv,cv.classification,cv.detection,cv.semantic]extra packages can be identified from the pyproject.toml.
To adapt for personal project
- Create your own dataset, dataloader, model, loss function, metric function, ... and register it to the registry so that it can be generated from config at runtime.
- Customize inherited trainer and pipeline to your need, such as what to do before/after training/validating step,...
- Write custom callbacks (recommended!), follow Lightning
- Modify configuration file
See theseus/cv/classification for example
To execute scripts with arguments
- Run the script with
--config-dirflag with a specified config folder that contains the yaml file. And--config-nameis that file's name.
Example:
python train.py \
--config-dir configs \
--config-name pipeline.yaml
- To override arguments inside the .yaml file, follow the instructions from Hydra. For example, to train 50 epochs and resume training from checkpoints:
python train.py \
--config-dir configs \
--config-name pipeline.yaml \
trainer.args.max_epochs=5000 \
global.resume=checkpoint.pth
Notice: There are no spaces between keys and values in -o flag
:school_satchel: Resources
- Example colab notebooks for classification tasks:
- Example colab notebooks for semantic segmentation tasks:
:blue_book: References
- This repo is inspired by https://github.com/vltanh/torchan Remember to give it a star .
- The big refactor is mostly adapted from https://github.com/HCMUS-ROBOTICS/ssdf-nncore 's nncore, which also deserves stars.
Explore related projects
tensorflow/tensorflow
An Open Source Machine Learning Framework for Everyone
201,427 starshuggingface/transformers
🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training.
168,711 starsAUTOMATIC1111/stable-diffusion-webui
Stable Diffusion web UI
165,274 starsComfy-Org/ComfyUI
The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface. The fastest local inference engine in the world.
146,024 stars