WXinlong / SOLO

SOLO and SOLOv2 for instance segmentation, ECCV 2020 & NeurIPS 2020.
Other
1.68k stars 306 forks source link

single class instance segmentation #109

Open gnnbest opened 3 years ago

gnnbest commented 3 years ago

Can the pretrained model predict (or export) single class? (not with 80 classes based on COCO dataset) ?

I use SOLOv2_Light_512_DCN_R50_3x, but it costs 0.065s per image, It's different from what was said in the project:0.035s

def main(): args = parse_args() model = init_detector( args.config, args.checkpoint, device=torch.device('cuda', args.device)) camera = cv2.VideoCapture("/home/gunn/SOLO/demo/videos/111.mp4") while True: ret_val, img = camera.read() pre = time.time() result = inference_detector(model, img) cur = time.time() print("time: ", cur - pre) I just want to detect 'person' class, and I do not need other classes, how can I do it ?Will the detection speed be faster ? Thanks !

WXinlong commented 3 years ago

@gnnbest You can just pick the output of 'person class'. The speed is tested as described in #27.