From d9ad4cb1dfee5ab0eef3ba49f4d65be8938a5f0f Mon Sep 17 00:00:00 2001 From: Shichao Li Date: Mon, 16 Aug 2021 15:32:43 +0800 Subject: [PATCH] Update training.md --- docs/training.md | 54 +++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 53 insertions(+), 1 deletion(-) diff --git a/docs/training.md b/docs/training.md index 38aa61e..9ef31e7 100644 --- a/docs/training.md +++ b/docs/training.md @@ -1 +1,53 @@ -Under preparation. +Firstly you need to prepare the dataset as described [here](https://github.com/Nicholasli1995/EgoNet/blob/master/docs/preparation.md). + +Then download a start point model [here](https://drive.google.com/file/d/1VFtMGgBG0cLGnbr3brrnPnJii2xGYj-9/view?usp=sharing) and place it at ${EgoNet_DIR}/resources. + +The training phase consists of two stages which are described as follows. + +For training on other datasets. You need to prepare the training images and camera parameters accordingly. + +## Stage 1: train a lifter (L.pth) +You need to modify the configuration by + +```bash +cd ${EgoNet_DIR}/configs && vim KITTI_train_lifting.yml +``` +Edit dataset:root to your KITTI directory. + +(Optional) Edit dirs:output to where you want to save the output model. + +(Optional) You can evaluate during training by setting eval_during to True. + +Finally, run + +```bash + cd tools + python train_lifting.py --cfg "../configs/KITTI_train_lifting.yml" +``` + + +## Stage 2: train the remaining part (HC.pth) +You need to modify the configuration by + +```bash +cd ${EgoNet_DIR}/configs && vim KITTI_train_IGRs.yml +``` + +Edit dataset:root to your KITTI directory. + +Edit gpu_id according to your local machine and set batch_size based on how much GPU memory you have. + +(Optional) Edit dirs:output to where you want to save the output model. + +(Optional) You can evaluate during training by setting eval_during to True. + +(Optional) Edit ss to enable self-supervised representation learning. You need to prepare unlabeled images as described here. + +(Optional) Edit training_settings:debug to disable saveing intermediate training results. + +Finally, run + +```bash + cd tools + python train_IGRs.py --cfg "../configs/KITTI_train_IGRs.yml" +```