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

咨询 #13

Open
Codeczh opened this issue Sep 7, 2020 · 6 comments
Open

咨询 #13

Codeczh opened this issue Sep 7, 2020 · 6 comments

Comments

@Codeczh
Copy link

Codeczh commented Sep 7, 2020

你好,我想咨询一下两个问题,
一、cub数据集加载时候,box标签是不是并没有用到(因为用到算强监督)
二、pretrained_model加载是是resnet50,那么所初始化加载的resnet50(original)是否需要cub200上 fine-tune

@ZF4444
Copy link
Owner

ZF4444 commented Sep 7, 2020

1.实际训练中是没有用到,测试时加载了,只是为了评估在不使用box标签训练的情况下定位的准确率。
2.当然需要fine-tune。

@Codeczh
Copy link
Author

Codeczh commented Sep 8, 2020

谢谢,还有预训练resnet50时,数据加载用的代码里的吗,因为我发现我的train-transform部分和你的不太一样

@ZF4444
Copy link
Owner

ZF4444 commented Sep 8, 2020

谢谢,还有预训练resnet50时,数据加载用的代码里的吗,因为我发现我的train-transform部分和你的不太一样

"预训练resnet50时,数据加载用的代码里的吗", 你的这句我没看太懂,不太理解

@Codeczh
Copy link
Author

Codeczh commented Sep 8, 2020

你好,是我没表述清楚,因为需要先训练 finetune的resnet50,在finetune时候要加载cub200的图片,那这一步的train-transform是和你代码里的dataset.py部分一样吗,因为我一般设置的是
train_transform = torchvision.transforms.Compose([
torchvision.transforms.Resize(448),
torchvision.transforms.RandomHorizontalFlip(),
torchvision.transforms.RandomCrop(448),
torchvision.transforms.ToTensor(),
torchvision.transforms.Normalize(mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225])
你的代码里有用到
transforms.Resize((self.input_size, self.input_size), Image.BILINEAR)
transforms.RandomHorizontalFlip()
transforms.ColorJitter(brightness=0.2, contrast=0.2)
transforms.ToTensor()
transforms.Normalize([0.485, 0.456, 0.406], [0.229, 0.224, 0.225])

@ZF4444
Copy link
Owner

ZF4444 commented Sep 9, 2020

预训练的resnet-50模型是在imagenet上训练的,直接拿来继续在细粒度数据集上训练就行了

@Codeczh
Copy link
Author

Codeczh commented Sep 9, 2020

预训练的resnet-50模型是在imagenet上训练的,直接拿来继续在细粒度数据集上训练就行了

所以,不需要 fine-tune好一个 resnet50(num_classes=200),将其前半部分特征抽取层来作为MMAL-Net的预训练加载模型MainNet.pretrained_model了是吗,直接用 ImageNet的resnet50(去掉fc的)加载到 MainNet.pretrained_model,并与object和part一起fine-tune训练。 我理解啦,非常感谢!!

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

2 participants