ins_forward.py 521 B

123456789101112131415
  1. from models.line_detect.heads.head_losses import features_align
  2. def ins_forward(model, features, image_shapes, proposals):
  3. # print(f'circle_proposals:{len(proposals)}')
  4. cs_features = features
  5. feature_logits = model.ins_decoder(cs_features)
  6. print(f'feature_logits from mask_decoder:{feature_logits.shape}')
  7. roi_features = features_align(feature_logits, proposals, image_shapes)
  8. if roi_features is not None:
  9. print(f'roi_features from align:{roi_features.shape}')
  10. return roi_features