Skip to content

Running Train Code On Dataset

Chahat Deep Singh edited this page Jul 11, 2021 · 3 revisions

Running Training Code

Download Code

  • Download the code by running cloning this repository
git clone https://github.com/prgumd/EVPropNet

Dependencies

You'll need the following dependencies to run our code.

  • OpenCV 3.3
  • TensorFlow 1.14 (GPU or CPU version)
  • Appropriate Cuda and Cudnn version for your Tensorflow and Ubuntu version
  • Matplotlib
  • tqdm
  • Numpy
  • Termcolor

We've tested the code on both Ubuntu 16.04 and 18.04 using Tensorflow 1.14 on GPU using Python 3.6.

Download the Dataset

  • The dataset can be downloaded from here.

Running the code

Run the Train code by using the following command from the Code folder

python3 Train.py --BasePath=<Path_to_Imgs_and_Labels> --NumEpochs=50 --MiniBatchSize=32 --CheckPointPath=<Path_to_CheckPoints>/ --LogsPath=<Paths_to_Logs>/ --LR=1e-4 

Note: Log files can be upto 100 GBs for 200 epochs.

Sample command to run train code:

python3 Train.py --BasePath=/home/nitin/Datasets/DVSProp --NumEpochs=50 --MiniBatchSize=32 --CheckPointPath=/media/nitin/Education/DVSProp/CheckPoints/ --LogsPath=/media/nitin/Education/DVSProp/Logs/ --LR=1e-4 

One can use the following command line arguments:

Commonly used:

  • --BasePath: Base path of images. The base path MUST contains folders: 'Imgs' and 'Labels'.
  • --MiniBatchSize: Size of the MiniBatch to use
  • --LoadCheckPoint: Load Model from latest Checkpoint from CheckPointPath to continue training. (Do not use this flag if you want to train from beginning.)
  • --CheckPointPath: Path to the saved model
  • --LogsPath: Path to save Logs
  • --LR: Learning Rate
  • --GPUDevice: What GPU do you want to use? -1 for CPU.
  • --ImgFormat: Image extension

Deprecated:

  • --NetworkType
  • --UncType
  • --RemoveLogs

Rarely Used:

  • --DivTrain: Factor to reduce Train data by per epoch, used for quick testing
  • --NetworkName: Name of network file.
  • --InitNeurons: Number of starting neurons. Use the same value that network was trained on.
  • --Suffix: Suffix for Naming Network, only used if you want to use multiple networks
  • --GT: Ground Truth Path