From aad3ee3c045918f6733d1f314e748da48e342a7b Mon Sep 17 00:00:00 2001 From: "zhangbin.zhu" <13204846+asltw@user.noreply.gitee.com> Date: Thu, 20 Jul 2023 10:28:57 +0000 Subject: [PATCH 1/3] add DenseNet121(PaddlePaddle) link #I7I83C add DenseNet121(PaddlePaddle) README.md Signed-off-by: zhangbin.zhu --- .../densenet/paddlepaddle/README.md | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 cv/classification/densenet/paddlepaddle/README.md diff --git a/cv/classification/densenet/paddlepaddle/README.md b/cv/classification/densenet/paddlepaddle/README.md new file mode 100644 index 00000000..32d56a62 --- /dev/null +++ b/cv/classification/densenet/paddlepaddle/README.md @@ -0,0 +1,47 @@ +# DenseNet +## Model description +A DenseNet is a type of convolutional neural network that utilises dense connections between layers, through Dense Blocks, where we connect all layers (with matching feature-map sizes) directly with each other. To preserve the feed-forward nature, each layer obtains additional inputs from all preceding layers and passes on its own feature-maps to all subsequent layers. + +## Step 1: Installing +```bash +git clone --recursive https://github.com/PaddlePaddle/PaddleClas.git +cd PaddleClas +pip3 install -r requirements.txt +``` + +Sign up and login in [ImageNet official website](https://www.image-net.org/index.php), then choose 'Download' to download the whole ImageNet dataset. Specify `/path/to/imagenet` to your ImageNet path in later training process. + +The ImageNet dataset path structure should look like: + +```bash +imagenet +├── train +│ └── n01440764 +│ ├── n01440764_10026.JPEG +│ └── ... +├── train_list.txt +├── val +│ └── n01440764 +│ ├── ILSVRC2012_val_00000293.JPEG +│ └── ... +└── val_list.txt +``` + +## Step 2: Training + +```bash +# Make sure your dataset path is the same as above +cd PaddleClas +# Link your dataset to default location +ln -s /path/to/imagenet ./dataset/ILSVRC2012 + +export FLAGS_cudnn_exhaustive_search=True +export FLAGS_cudnn_batchnorm_spatial_persistent=True + +export CUDA_VISIBLE_DEVICES=0,1,2,3 +python3 -u -m paddle.distributed.launch --gpus=0,1,2,3 tools/train.py -c ppcls/configs/ImageNet/DenseNet/DenseNet121.yaml -o Arch.pretrained=False -o Global.device=gpu +``` + +## Reference + +- [PaddleClas](https://github.com/PaddlePaddle/PaddleClas) \ No newline at end of file -- Gitee From 76b3b1b5660756f8f686d5f58dba4f8b2a42f317 Mon Sep 17 00:00:00 2001 From: "zhangbin.zhu" <13204846+asltw@user.noreply.gitee.com> Date: Fri, 21 Jul 2023 05:34:57 +0000 Subject: [PATCH 2/3] add DenseNet121 PaddlePaddle link #I7I83C add DenseNet121 PaddlePaddle Signed-off-by: zhangbin.zhu <13204846+asltw@user.noreply.gitee.com> --- cv/classification/densenet/paddlepaddle/README.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/cv/classification/densenet/paddlepaddle/README.md b/cv/classification/densenet/paddlepaddle/README.md index 32d56a62..29c390fa 100644 --- a/cv/classification/densenet/paddlepaddle/README.md +++ b/cv/classification/densenet/paddlepaddle/README.md @@ -6,7 +6,16 @@ A DenseNet is a type of convolutional neural network that utilises dense connect ```bash git clone --recursive https://github.com/PaddlePaddle/PaddleClas.git cd PaddleClas -pip3 install -r requirements.txt + +pip install urllib3==1.26.6 +pip install scikit-learn==0.21.0 +pip install opencv-python==4.6.0.66 +pip install opencv-python-headless +yum install mesa-libGL -y +pip install visualdl==2.2.0 +pip uninstall markdown +pip install easydict + ``` Sign up and login in [ImageNet official website](https://www.image-net.org/index.php), then choose 'Download' to download the whole ImageNet dataset. Specify `/path/to/imagenet` to your ImageNet path in later training process. -- Gitee From e493e0ae93f480fa0aafec57e9940cef6cf22eec Mon Sep 17 00:00:00 2001 From: "zhangbin.zhu" Date: Fri, 21 Jul 2023 05:42:29 +0000 Subject: [PATCH 3/3] add DenseNet121 paddlepaddle link #I7I83C add DenseNet121 paddlepaddle Signed-off-by: zhangbin.zhu --- cv/classification/densenet/paddlepaddle/README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/cv/classification/densenet/paddlepaddle/README.md b/cv/classification/densenet/paddlepaddle/README.md index 29c390fa..7c4658eb 100644 --- a/cv/classification/densenet/paddlepaddle/README.md +++ b/cv/classification/densenet/paddlepaddle/README.md @@ -15,7 +15,6 @@ yum install mesa-libGL -y pip install visualdl==2.2.0 pip uninstall markdown pip install easydict - ``` Sign up and login in [ImageNet official website](https://www.image-net.org/index.php), then choose 'Download' to download the whole ImageNet dataset. Specify `/path/to/imagenet` to your ImageNet path in later training process. -- Gitee