ZwwWayne / K-Net

[NeurIPS2021] Code Release of K-Net: Towards Unified Image Segmentation
Apache License 2.0
467 stars 45 forks source link

Does the batch_size must be set to 2? #12

Closed xiehousen closed 2 years ago

xiehousen commented 2 years ago

if cls_scores is None: detached_cls_scores = [None] * 2 else: detached_cls_scores = cls_scores.detach() for i in range(num_imgs): assign_result = self.assigner.assign(scaled_mask_preds[i].detach(), detached_cls_scores[i], gt_masks[i], gt_labels[i], img_metas[i])

as can be seen from above code, len(detached_cls_scores)=2

ZwwWayne commented 2 years ago

It seems that this is a hard code, I will fix it later. Thank you~

ZwwWayne commented 2 years ago

resolved in https://github.com/ZwwWayne/K-Net/commit/5e50ee58957dce972f51096804ff69171c2f072e

AlphaNext commented 2 years ago

resolved in 5e50ee5

@ZwwWayne If I set batch size to 8, the same problem may occur in Instance Segmentation task with this config file.

Is there problem in file kernel_head.py and kernel_update_head.py?