This vision framework is for training and inference on custom PyTorch models with flexibility for various datasets, models, data augmentation.
- Fix dataloading structure to accomodate another set
- Fix data processing to implement k-folds
- Improve evaluation metrics with classic vision model metrics
- Move model blocks to blocks file to generalize the models
- Fix inference with new file names
- Allow inference to take in a series of images and show them as a video
- Allow inference to take in a video and and show result as an output video (real-time?)
- Generalize the loss function?
- Training custom model:
- Adjust hyperparameters and current model type selection in
config.yaml - Run
train.py - Select model and copy its path into inference.py to use a specific trained model
- Run
inference.py
- Adjust hyperparameters and current model type selection in
dataset: All image files and corresponding labels for Training/Testingimages: Training and Testing image datatrainingtesting
labels: Labels for Training data, no labels for Testing data
figs: Custom training output figurestrained_models: Saved model state dictionariessrc: Source codedata_processing: Downloading and processing of datadata_downloader.py: Download chosen datadata_processing_kitti.py: Process the KITTI data for training, validation, and testingdata_processing.py: Extracts KITTI data from the chosen dataset and sets it up for training
models: PyTorch model architectures__blocks__.py: PyTorch custom blocks for model building__init__.py: imports all model files to the solver and dynamically chooses the model based on the config.yaml file_type parameterSimpleYOLO.py: SimpleYOLO model implementationTinyYOLO.py: TinyYOLO model implementationMidYOLO.py: AttentionYOLO model implementationEncoderDecoderYOLO.py: EncodeYOLO model implementation
setup: Helper functionsglobals.py: Source the global directoryload_args: Load arguments from kwargs for training
inference.py: Run inference on the trained modelloss.py: Loss calculationsprocess_output_img.py: process inference images for viewingsolver.py: Core function for training the modeltrain.py: Train a model
config.yaml: Model training hyperparametersenvironment.yaml: Conda environment
- Create environment with
conda env create -f environment.yaml - Still need to run
pip install torchevalafter activating conda env, pkg cannot be installed from conda env