chainer / chainercv

ChainerCV: a Library for Deep Learning in Computer Vision
MIT License
1.48k stars 304 forks source link

Detection of Single Class Objects #765

Closed Niranjankumar-c closed 5 years ago

Niranjankumar-c commented 5 years ago

Can i use the ChainerCV to detect only the objects that belong to single class, like i want to detect only persons face and draw a bounding box around that face using frcnn or ssd? is it possible?.

knorth55 commented 5 years ago

You can do it by masking the output. model.predict function of detection model returns bboxes, labels, scores, labels have class information. you can filter bounding boxes with something like human_bboxes = bboxes[labels == label_names.index('human')]