-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
the result is very strange #1
Comments
ResultsI'm using 2.19.0 exactly, and the results show no GAP between my implementation and the official version. TipsThe official checkpoint file should be modified before you use it because the key names don't match. Codeimport torch
import re
dict = torch.load("/disk1/lihao/model_zoo/solo/SOLOv2_R50_1x.pth")
patt='mask_feat_head'
pattern = re.compile(patt)
key_list = list(dict['state_dict'].keys())
for older_val in key_list:
if len(pattern.findall(older_val)) != 0:
val = re.sub('mask_feat_head', 'mask_head', older_val)
dict['state_dict'][val] = dict['state_dict'].pop(older_val)
print(dict['state_dict'].keys())
torch.save(dict, '/disk1/lihao/model_zoo/solo/SOLOv2_fpn_R50_1x.pth') Example |
Thank you for great reply. I'm using 2.22.0 mmdet. I actually retrain solov2 for cityscapes dataset. And the cityscapes annotations have been converted into the coco format using the cityscapesScripts toolbox according the WXinlong/SOLO in github.
The cityscapes.json like that:
{"images":[{ "id":0,"width":2048,“height”: ,:"filename": ,"seg_file_name": .............]
"categories":["id":1,"name":"person",.............],
"annotations":[{"id": 0, "image_id: 0,"segmentation":[[953,406,,,,,,,]],"category_id": ,"iscrwd":,"area" : ,"bbox":[]}.....
And i modifiled the configs and so no. Strangely enough, it can train normally, but the results are very bad,the AP is only 0.02%. In fact, I checked the Dataloader carefully and found no problem. Can you consider adding Cityscapes config file for SOLOv2 training?Thank you very much !
…------------------ 原始邮件 ------------------
发件人: "lifuguan/SOLOv2-mmdet" ***@***.***>;
发送时间: 2022年3月15日(星期二) 下午5:11
***@***.***>;
***@***.******@***.***>;
主题: Re: [lifuguan/SOLOv2-mmdet] the result is very strange (Issue #1)
Results
I'm using 2.19.0 exactly, and the results show no GAP between my implementation and the official version.
Tips
The official checkpoint file should be modified before you use due to the fact that the key names don't match.
Code
import torch import re dict = torch.load("/disk1/lihao/model_zoo/solo/SOLOv2_R50_1x.pth") patt='mask_feat_head' pattern = re.compile(patt) key_list = list(dict['state_dict'].keys()) for older_val in key_list: if len(pattern.findall(older_val)) != 0: val = re.sub('mask_feat_head', 'mask_head', older_val) dict['state_dict'][val] = dict['state_dict'].pop(older_val) print(dict['state_dict'].keys()) torch.save(dict, '/disk1/lihao/model_zoo/solo/SOLOv2_fpn_R50_1x.pth')
Example
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
请问为什么要把mask_feat_head替换成mask_head呢? |
mask_feat_head和mask_head对应mmdet中组件的变量名,类似于 关于mask_feat_headmask_feat_head是mmdet 1.x版本中 关于mask_head在mmdet 2.x版本中, @property
def with_mask(self):
"""bool: whether the detector has a mask head"""
return ((hasattr(self, 'roi_head') and self.roi_head.with_mask)
or (hasattr(self, 'mask_head') and self.mask_head is not None)) 所以,只能修改变量名字以适配mmdet 2.x |
In general, the model should be fine. Maybe you can load an official checkpoint file, and run a |
HI,Thank you for great job!
Did you run the code with the mmdet(2.19.0)version ? Can you tell me the result on coco test comparision with original solov2 in the paper? IS there a gap?
And i run the solov2 in mmdet(2.19.0)version on cityscapes,the result is very strange,...can not undertstand. Can you give me some advices,Thank you very much.
The text was updated successfully, but these errors were encountered: