From 37f03a77c57b4e80a0afa8f7308ec2348ea0953c Mon Sep 17 00:00:00 2001 From: BaofengZan Date: Sun, 7 Feb 2021 03:41:16 -0600 Subject: [PATCH] fixed some issues (#400) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 1 动态输入 2 图像预处理和后处理和pytorch同步 3 代码格式统一 * 重新梳理代码 * tab 替换为4 space * HRNet-Semantic-Segmentation * update result img * update readme * Synchronize * Modify some bugs --- dbnet/common.hpp | 4 ++-- hrnet/hrnet-semantic-segmentation/README.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dbnet/common.hpp b/dbnet/common.hpp index b1286de..e26aebc 100644 --- a/dbnet/common.hpp +++ b/dbnet/common.hpp @@ -110,8 +110,8 @@ ILayer* convBnLeaky(INetworkDefinition *network, std::map& conv1->setPaddingNd(DimsHW{ p, p }); conv1->setNbGroups(g); //IScaleLayer* bn1 = addBatchNorm2d(network, weightMap, *conv1->getOutput(0), lname + ".bn", 1e-4); - IScaleLayer* bn1 = addBatchNorm2d(network, weightMap, *conv1->getOutput(0), lname.substr(0, lname.find_last_of(".")) + bnname, 1e-3); - auto lr = network->addActivation(*bn1->getOutput(0), ActivationType::kLEAKY_RELU); + IScaleLayer* bn1 = addBatchNorm2d(network, weightMap, *conv1->getOutput(0), lname.substr(0, lname.find_last_of(".")) + bnname, 1e-5); + auto lr = network->addActivation(*bn1->getOutput(0), ActivationType::kRELU); lr->setAlpha(0.1); return lr; } diff --git a/hrnet/hrnet-semantic-segmentation/README.md b/hrnet/hrnet-semantic-segmentation/README.md index 70acf01..ccf6591 100644 --- a/hrnet/hrnet-semantic-segmentation/README.md +++ b/hrnet/hrnet-semantic-segmentation/README.md @@ -1,13 +1,13 @@ # HRNet-Semantic-Segmentation -The Pytorch implementation is [HRNet-Semantic-Segmentation](https://github.com/HRNet/HRNet-Semantic-Segmentation). The implemented model is **HRNetV2-W18-Small-v2** +The Pytorch implementation is [HRNet-Semantic-Segmentation-v1.1](https://github.com/HRNet/HRNet-Semantic-Segmentation/tree/pytorch-v1.1). The implemented model is **HRNetV2-W18-Small-v2** ## How to Run * 1. generate .wts - Download code and model from [HRNet-Semantic-Segmentation](https://github.com/HRNet/HRNet-Semantic-Segmentation) and config your environments. + Download code and model from [HRNet-Semantic-Segmentation-v1.1](https://github.com/HRNet/HRNet-Semantic-Segmentation/tree/pytorch-v1.1) and config your environments. Put `demo.py` in the `YOUR_ROOT_DIR\HRNet-Semantic-Segmentation\tools ` folder, set `savewts in main()` as `True`, and run, the .wts will be generated.