- Python 3.11
- NVIDIA GPU with CUDA support
- Miniconda or Anaconda
- Create and activate a new conda environment:
conda create -n learning python=3.11
conda activate learning- Install PyTorch and related packages:
conda install pytorch torchvision torchaudio pytorch-cuda=12.1 -c pytorch -c nvidia- Install other dependencies:
pip install -r requirements.txtdataset.py: Implements the SimpleVideoDataset class for video data handlingmodel.py: Contains the Simple3DCNN architecturetraining.py: Training loop implementationtest_model.py: Model evaluation scriptvisualize.py: Visualization script to measure model performance and generate confusion matrixutils.py: Helper functionsoutputs/: Directory for storing model checkpoints and logs
Update the training.py script to take in the correct hyperparameters
batch_size: number of videos per batchlearning_rate: learning rate for the optimizernum_epochs: number of epochs to train forpatience: number of epochs to wait before early stopping (0 to disable)
Also update the dataset root directory in the training.py script
dataset_root: root directory of the dataset
Dataset files:
train.csv: training datasetval.csv: validation datasettest.csv: test dataset
Format of the dataset files(csv):
<video_path>, <label>
<video_path>, <label>
<video_path>, <label>
...
python training.py[Add your license information here]
[Add your contact information if you want]
#TODO update script to take true csvs instead of weird txt format