# How can I extend Detectron 2 (and PointRed) that detects (segments) COCO classes to detect 20 more new object classes?

**URL:** <https://discuss.pytorch.org/t/how-can-i-extend-detectron-2-and-pointred-that-detects-segments-coco-classes-to-detect-20-more-new-object-classes/118911>\
**Category:** vision\
**Created:** [April 21, 2021, 6:53am UTC](https://discuss.pytorch.org/t/how-can-i-extend-detectron-2-and-pointred-that-detects-segments-coco-classes-to-detect-20-more-new-object-classes/118911 "2021-04-21T06:53:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mona\_Jalal](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/mona_jalal/32/25715_2.png) [@Mona\_Jalal](https://discuss.pytorch.org/u/Mona_Jalal)\
**Post date:** [April 21, 2021, 6:53am UTC](https://discuss.pytorch.org/t/how-can-i-extend-detectron-2-and-pointred-that-detects-segments-coco-classes-to-detect-20-more-new-object-classes/118911/1 "2021-04-21T06:53:00Z")

</div>

Could you please kindly guide me on how I can extend Detectron 2 that already detects COCO classes to detect 20 more new object classes on top of 80 COCO classes?

How about `[PointRed](https://github.com/facebookresearch/detectron2/tree/master/projects/PointRend)` instance segmentation? How can I expand it such that it can create an instance segmentation mask for new object classes (20) besides the current 80 COCO classes?

Here’s an example of PointRed output for COCO object classes.

 ![Screenshot from 2021-04-21 01-45-34](https://discuss.pytorch.org/uploads/default/original/3X/2/8/28cc9b3eb9f156f13044c5f92669ae12a1045aff.jpeg)

- This is a [double-post](https://github.com/facebookresearch/detectron2/discussions/2945) but thought someone from here might know by chance.
