Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

yolov1's backbone network resnet has a bit of a problem #16

Open
ThreeStones1029 opened this issue Aug 4, 2024 · 0 comments
Open

yolov1's backbone network resnet has a bit of a problem #16

ThreeStones1029 opened this issue Aug 4, 2024 · 0 comments

Comments

@ThreeStones1029
Copy link

I found several mistakes in the backbone code of yolov1. The code error is in models/detectors/yolov1/yolov1_backbone.py 232 and 235,maybe you forgot to change it,duplicate resnet34 appears.
Before modification

def build_backbone(model_name='resnet18', pretrained=False):
    if model_name == 'resnet18':
        model = resnet18(pretrained)
        feat_dim = 512
    elif model_name == 'resnet34':
        model = resnet34(pretrained)
        feat_dim = 512
    elif model_name == 'resnet50':
        model = resnet34(pretrained)
        feat_dim = 2048
    elif model_name == 'resnet101':
        model = resnet34(pretrained)
        feat_dim = 2048

After modification

def build_backbone(model_name='resnet18', pretrained=False):
    if model_name == 'resnet18':
        model = resnet18(pretrained)
        feat_dim = 512
    elif model_name == 'resnet34':
        model = resnet34(pretrained)
        feat_dim = 512
    elif model_name == 'resnet50':
        model = resnet50(pretrained)
        feat_dim = 2048
    elif model_name == 'resnet101':
        model = resnet101(pretrained)
        feat_dim = 2048
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant