-
Notifications
You must be signed in to change notification settings - Fork 2.5k
trian cityscapes use coco pretrain model problem ? #259
Comments
Hi, I believe best results for cityscapes are obtained after starting from a model pre-trained on COCO, and then some model surgery are done so that the common classes between COCO and cityscapes are kept. About your second question, I'm sorry but I couldn't understand what was the problem that you are facing. Can you give a bit more context? |
thanks you @fmassa reply. i have get some help from #15 . but I haven't reproduced the cityscapes instance segmentation result yet .i hope someone can share the cityscpaes model . so i can compare the different.
|
I haven't myself trained models on cityscapes, so I might not be the best person to help you with that. Maybe @henrywang1 knows a bit better, as he's the one who originally added support to cityscapes |
Hi @ranjiewwen,
I didn't submit the code because I thought everyone might have their own transformation. In class RandomResize(object):
def __init__(self, min_size, max_size):
self.min_size = min_size
self.max_size = max_size
def get_size(self, image_size):
w, h = image_size
min_size = self.min_size
max_size = self.max_size
rand = random.randint(min_size, max_size)
return rand, int(w*rand/h)
def __call__(self, image, target):
size = self.get_size(image.size)
image = F.resize(image, size)
target = target.resize(image.size)
return image, target In if "cityscapes" in cfg.DATASETS.TRAIN[0]:
if is_train:
transform = T.Compose(
[
T.RandomResize(800, 1024),
T.RandomHorizontalFlip(flip_prob),
T.ToTensor(),
normalize_transform,
]
)
else:
transform = T.Compose(
[
T.ToTensor(),
normalize_transform,
]
)
else: #... |
thanks @henrywang1 . i will try to train again! look for the good result ! |
I am wondering what is the mAP in your result? Is it the bbox mAP? |
mAP is for the bbox , you can read original mask r-cnn paper, or read the evaluation code: coco_eval.py |
hi @ranjiewwen after set both MAX_SIZE_TRAIN and MAX_SIZE_TEST to |
hi @henrywang1 |
Hi @zimenglan-sysu-512 And I just notice that my previous reply is not complete. transform = T.Compose(
[
T.Resize(1024, 1024),
T.ToTensor(),
normalize_transform,
]
) For other settings or training log, you could send an e-mail me. |
❓ Questions and Help
maskrcnn-benchmark/maskrcnn_benchmark/utils/model_serialization.py
get problem becasemodel_state_dict[key] = loaded_state_dict[key_old]
overwriting the original value :maskrcnn_benchmark/utils/checkpoint.py
get error, i don't know why should loadself.optimizer.load_state_dict and self.scheduler.load_state_dict
, it has'momentum_buffer'
paremeter , i don't understand why load this parameter . can you explain ? and how can i use coco pretrain model to finetune cityscapes ? thanks !The text was updated successfully, but these errors were encountered: