From ab4ab3a355068408e08bffd31767a6045db5d0d8 Mon Sep 17 00:00:00 2001 From: majorli Date: Thu, 1 Dec 2022 05:48:00 +0000 Subject: [PATCH] hrnet model missing requirements.txt link I63W67 Signed-off-by: majorli --- cv/pose/hrnet/pytorch/README.md | 42 +++++++++++++++++--------- cv/pose/hrnet/pytorch/requirements.txt | 13 ++++++++ 2 files changed, 40 insertions(+), 15 deletions(-) create mode 100644 cv/pose/hrnet/pytorch/requirements.txt diff --git a/cv/pose/hrnet/pytorch/README.md b/cv/pose/hrnet/pytorch/README.md index b3059656f..b4ebfcf14 100644 --- a/cv/pose/hrnet/pytorch/README.md +++ b/cv/pose/hrnet/pytorch/README.md @@ -4,36 +4,48 @@ HRNet, or High-Resolution Net, is a general purpose convolutional neural network for tasks like semantic segmentation, object detection and image classification. It is able to maintain high resolution representations through the whole process. We start from a high-resolution convolution stream, gradually add high-to-low resolution convolution streams one by one, and connect the multi-resolution streams in parallel. The resulting network consists of several stages and the nth stage contains n streams corresponding to n resolutions. The authors conduct repeated multi-resolution fusions by exchanging the information across the parallel streams over and over. -## Step 1: Preparing datasets +## Step 1: Installing packages + +```shell +pip3 install -r requirements.txt +``` + +## Step 2: Preparing datasets Download and extract the [COCO dataset](https://cocodataset.org/#download) -$ cd coco2017 -$ unzip -q annotations_trainval2017.zip -$ unzip -q train2017.zip -$ unzip -q val2017.zip -$ unzip -q val2017_mini.zip +```shell +cd coco2017 +unzip -q annotations_trainval2017.zip +unzip -q train2017.zip +unzip -q val2017.zip +unzip -q val2017_mini.zip +``` -## Step 2: Training +## Step 3: Training ### On single GPU -``` -$ python3 ./tools/train.py --cfg ./configs/coco/w32_512_adam_lr1e-3.yaml --datadir=${COCO_DATASET_PATH} --max_epochs=2 + +```shell +python3 ./tools/train.py --cfg ./configs/coco/w32_512_adam_lr1e-3.yaml --datadir=${COCO_DATASET_PATH} --max_epochs=2 ``` ### On single GPU (AMP) -``` -$ python3 ./tools/train.py --cfg ./configs/coco/w32_512_adam_lr1e-3.yaml --datadir=${COCO_DATASET_PATH} --max_epochs=2 --amp + +```shell +python3 ./tools/train.py --cfg ./configs/coco/w32_512_adam_lr1e-3.yaml --datadir=${COCO_DATASET_PATH} --max_epochs=2 --amp ``` ### Multiple GPUs on one machine -``` -$ python3 ./tools/train.py --cfg ./configs/coco/w32_512_adam_lr1e-3.yaml --datadir=${COCO_DATASET_PATH} --max_epochs=2 --dist + +```shell +python3 ./tools/train.py --cfg ./configs/coco/w32_512_adam_lr1e-3.yaml --datadir=${COCO_DATASET_PATH} --max_epochs=2 --dist ``` ### Multiple GPUs on one machine (AMP) -``` -$ python3 ./tools/train.py --cfg ./configs/coco/w32_512_adam_lr1e-3.yaml --datadir=${COCO_DATASET_PATH} --max_epochs=2 --amp --dist + +```shell +python3 ./tools/train.py --cfg ./configs/coco/w32_512_adam_lr1e-3.yaml --datadir=${COCO_DATASET_PATH} --max_epochs=2 --amp --dist ``` ## Reference diff --git a/cv/pose/hrnet/pytorch/requirements.txt b/cv/pose/hrnet/pytorch/requirements.txt new file mode 100644 index 000000000..e91f70272 --- /dev/null +++ b/cv/pose/hrnet/pytorch/requirements.txt @@ -0,0 +1,13 @@ +EasyDict==1.7 +opencv-python +Cython +scipy +pandas +pyyaml +json_tricks +scikit-image +tensorboardX +yacs +cffi +munkres +tqdm -- Gitee