HRNet / Lite-HRNet

This is an official pytorch implementation of Lite-HRNet: A Lightweight High-Resolution Network.
Apache License 2.0
809 stars 123 forks source link

HRNet or LiteHRNet? #68

Open uk9921 opened 2 years ago

uk9921 commented 2 years ago

https://github.com/HRNet/Lite-HRNet/blob/7b9049d264fa40402a27d1f175deff3b46a6b91b/models/backbones/litehrnet.py#L667

In the document-example, HRNet is written instead of LiteHRNet. I'm not sure if it is written incorrectly or deliberately. Is it wrong?

uk9921 commented 2 years ago
from mmpose.models import LiteHRNet
import torch
extra = dict(
            stem=dict(stem_channels=32, out_channels=32, expand_ratio=1),
            num_stages=3,
            stages_spec=dict(
                num_modules=(2, 4, 2),
                num_branches=(2, 3, 4),
                num_blocks=(2, 2, 2),
                module_type=('LITE', 'LITE', 'LITE'),
                with_fuse=(True, True, True),
                reduce_ratios=(8, 8, 8),
                num_channels=(
                    (40, 80),
                    (40, 80, 160),
                    (40, 80, 160, 320),
                )),
            with_head=True,
        )
self = LiteHRNet(extra, in_channels=3)
self.eval()
inputs = torch.rand(1, 1, 32, 32)
level_outputs = self.forward(inputs)

The above is my example, I‘m not sure whether these default parameters are set correctly. Correct me if I am wrong.

nsapkota417 commented 2 years ago

Hi, I have been using LiteHRNet for Semantic Segmentation. Your parameters look fine for Lite-HRNet-18. For Lite-HRNet-30, change num_modules to (3, 8, 3) and it should be good.

sunjian2015 commented 1 year ago

Hi, I have been using LiteHRNet for Semantic Segmentation. Your parameters look fine for Lite-HRNet-18. For Lite-HRNet-30, change num_modules to (3, 8, 3) and it should be good.

Hi, have you compared with HRNet-w16 on Semantic Segmentation? In this paper, the mIoU is higher than HRNet-16, but i got the opposite result, i don't know why

yangjianmao commented 3 months ago

nice