Skip to content

datnt153/thesis

Repository files navigation

I. Installation

conda create --name openmmlab python=3.8 -y
conda activate openmmlab
pip install torch==1.11.0+cu113 torchvision==0.12.0+cu113 torchaudio==0.11.0 --extra-index-url https://download.pytorch.org/whl/cu113
pip install -U openmim
mim install mmengine
mim install mmcv

II. Data Preparation

1. Build Dataset from Scratch

Create the Entire Dataset

  • Run the following commands:
    bash create_gt.sh
    python create_data.py
    This will generate a file named all.csv.

Create K-Folds

To split the data into training and testing sets similar to the utvm-vtcc team, use:

python create_kfolds.py

2. Download from Drive

Alternatively, you can download the dataset directly. Download 0.zip and 1-15.zip from this Google Drive folder and unzip them.

Data Structure

The dataset folder should have the following structure:

dataset
├── 0
├── 1
├── 2
├── 3
├── 4
├── 5
├── 6
├── 7
├── 8
├── 9
├── 10
├── 11
├── 12
├── 13
├── 14
└── 15

III. Train the Model

Make sure to update the data_path variable to point to your dataset directory. Then run the training script:

bash run.sh

Log Wandb

IV. Validation

  1. Navigate to the infer directory:

    cd infer
  2. Download the final_models.zip file from this Google Drive folder and unzip it.

  3. The folder structure for the models should look like this:

    final_models
    ├── tf_efficientnetv2_l_in21k imgs 256 bs 16
    │   ├── 2023_09_14_09.48
    │   └── 2023_09_14_17.18
    ├── tf_efficientnetv2_m_in21k imgs 256 bs 48
    │   ├── 2023_09_09_16.11
    │   └── 2023_09_09_19.32
    └── tf_efficientnetv2_s_in21k imgs 256 bs 48
        ├── 2023_09_13_17.46
        └── 2023_09_13_20.17
    
  4. Run the final inference:

    python final_inference.py

Compare Different Methods

You can also experiment with training other algorithms like:

  • SlowFast
  • C3D
  • TANet
  • TSN

For more details, refer to the "mmaction2/readme.md" file.

References

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published