Arulkumar03/Fox_Sheep_Detector_Computer_Vision_model
0
1# PointRend: Image Segmentation as Rendering2 3Alexander Kirillov, Yuxin Wu, Kaiming He, Ross Girshick4 5[[`arXiv`](https://arxiv.org/abs/1912.08193)] [[`BibTeX`](#CitingPointRend)]6 7<div align="center">8 <img src="https://alexander-kirillov.github.io/images/kirillov2019pointrend.jpg"/>9</div><br/>10 11In this repository, we release code for PointRend in Detectron2. PointRend can be flexibly applied to both instance and semantic segmentation tasks by building on top of existing state-of-the-art models.12 13## Quick start and visualization14 15This [Colab Notebook](https://colab.research.google.com/drive/1isGPL5h5_cKoPPhVL9XhMokRtHDvmMVL) tutorial contains examples of PointRend usage and visualizations of its point sampling stages.16 17## Training18 19To train a model with 8 GPUs run:20```bash21cd /path/to/detectron2/projects/PointRend22python train_net.py --config-file configs/InstanceSegmentation/pointrend_rcnn_R_50_FPN_1x_coco.yaml --num-gpus 823```24 25## Evaluation26 27Model evaluation can be done similarly:28```bash29cd /path/to/detectron2/projects/PointRend30python train_net.py --config-file configs/InstanceSegmentation/pointrend_rcnn_R_50_FPN_1x_coco.yaml --eval-only MODEL.WEIGHTS /path/to/model_checkpoint31```32 33# Pretrained Models34 35## Instance Segmentation36#### COCO37 38<table><tbody>39<!-- START TABLE -->40<!-- TABLE HEADER -->41<th valign="bottom">Mask<br/>head</th>42<th valign="bottom">Backbone</th>43<th valign="bottom">lr<br/>sched</th>44<th valign="bottom">Output<br/>resolution</th>45<th valign="bottom">mask<br/>AP</th>46<th valign="bottom">mask<br/>AP*</th>47<th valign="bottom">model id</th>48<th valign="bottom">download</th>49<!-- TABLE BODY -->50 <tr><td align="left"><a href="configs/InstanceSegmentation/pointrend_rcnn_R_50_FPN_1x_coco.yaml">PointRend</a></td>51<td align="center">R50-FPN</td>52<td align="center">1×</td>53<td align="center">224×224</td>54<td align="center">36.2</td>55<td align="center">39.7</td>56<td align="center">164254221</td>57<td align="center"><a href="https://dl.fbaipublicfiles.com/detectron2/PointRend/InstanceSegmentation/pointrend_rcnn_R_50_FPN_1x_coco/164254221/model_final_736f5a.pkl">model</a> | <a href="https://dl.fbaipublicfiles.com/detectron2/PointRend/InstanceSegmentation/pointrend_rcnn_R_50_FPN_1x_coco/164254221/metrics.json">metrics</a></td>58</tr>59 <tr><td align="left"><a href="configs/InstanceSegmentation/pointrend_rcnn_R_50_FPN_3x_coco.yaml">PointRend</a></td>60<td align="center">R50-FPN</td>61<td align="center">3×</td>62<td align="center">224×224</td>63<td align="center">38.3</td>64<td align="center">41.6</td>65<td align="center">164955410</td>66<td align="center"><a href="https://dl.fbaipublicfiles.com/detectron2/PointRend/InstanceSegmentation/pointrend_rcnn_R_50_FPN_3x_coco/164955410/model_final_edd263.pkl">model</a> | <a href="https://dl.fbaipublicfiles.com/detectron2/PointRend/InstanceSegmentation/pointrend_rcnn_R_50_FPN_3x_coco/164955410/metrics.json">metrics</a></td>67</tr>68</tr>69 <tr><td align="left"><a href="configs/InstanceSegmentation/pointrend_rcnn_R_101_FPN_3x_coco.yaml">PointRend</a></td>70<td align="center">R101-FPN</td>71<td align="center">3×</td>72<td align="center">224×224</td>73<td align="center">40.1</td>74<td align="center">43.8</td>75<td align="center"></td>76<td align="center"><a href="https://dl.fbaipublicfiles.com/detectron2/PointRend/InstanceSegmentation/pointrend_rcnn_R_101_FPN_3x_coco/28119983/model_final_3f4d2a.pkl">model</a> | <a href="https://dl.fbaipublicfiles.com/detectron2/PointRend/InstanceSegmentation/pointrend_rcnn_R_101_FPN_3x_coco/28119983/metrics.json">metrics</a></td>77</tr>78</tr>79 <tr><td align="left"><a href="configs/InstanceSegmentation/pointrend_rcnn_X_101_32x8d_FPN_3x_coco.yaml">PointRend</a></td>80<td align="center">X101-FPN</td>81<td align="center">3×</td>82<td align="center">224×224</td>83<td align="center">41.1</td>84<td align="center">44.7</td>85<td align="center"></td>86<td align="center"><a href="https://dl.fbaipublicfiles.com/detectron2/PointRend/InstanceSegmentation/pointrend_rcnn_X_101_32x8d_FPN_3x_coco/28119989/model_final_ba17b9.pkl">model</a> | <a href="https://dl.fbaipublicfiles.com/detectron2/PointRend/InstanceSegmentation/pointrend_rcnn_X_101_32x8d_FPN_3x_coco/28119989/metrics.json">metrics</a></td>87</tr>88</tbody></table>89 90AP* is COCO mask AP evaluated against the higher-quality LVIS annotations; see the paper for details.91Run `python detectron2/datasets/prepare_cocofied_lvis.py` to prepare GT files for AP* evaluation.92Since LVIS annotations are not exhaustive, `lvis-api` and not `cocoapi` should be used to evaluate AP*.93 94#### Cityscapes95Cityscapes model is trained with ImageNet pretraining.96 97<table><tbody>98<!-- START TABLE -->99<!-- TABLE HEADER -->100<th valign="bottom">Mask<br/>head</th>101<th valign="bottom">Backbone</th>102<th valign="bottom">lr<br/>sched</th>103<th valign="bottom">Output<br/>resolution</th>104<th valign="bottom">mask<br/>AP</th>105<th valign="bottom">model id</th>106<th valign="bottom">download</th>107<!-- TABLE BODY -->108 <tr><td align="left"><a href="configs/InstanceSegmentation/pointrend_rcnn_R_50_FPN_1x_cityscapes.yaml">PointRend</a></td>109<td align="center">R50-FPN</td>110<td align="center">1×</td>111<td align="center">224×224</td>112<td align="center">35.9</td>113<td align="center">164255101</td>114<td align="center"><a href="https://dl.fbaipublicfiles.com/detectron2/PointRend/InstanceSegmentation/pointrend_rcnn_R_50_FPN_1x_cityscapes/164255101/model_final_115bfb.pkl">model</a> | <a href="https://dl.fbaipublicfiles.com/detectron2/PointRend/InstanceSegmentation/pointrend_rcnn_R_50_FPN_1x_cityscapes/164255101/metrics.json">metrics</a></td>115</tr>116</tbody></table>117 118 119## Semantic Segmentation120 121#### Cityscapes122Cityscapes model is trained with ImageNet pretraining.123 124<table><tbody>125<!-- START TABLE -->126<!-- TABLE HEADER -->127<th valign="bottom">Method</th>128<th valign="bottom">Backbone</th>129<th valign="bottom">Output<br/>resolution</th>130<th valign="bottom">mIoU</th>131<th valign="bottom">model id</th>132<th valign="bottom">download</th>133<!-- TABLE BODY -->134 <tr><td align="left"><a href="configs/SemanticSegmentation/pointrend_semantic_R_101_FPN_1x_cityscapes.yaml">SemanticFPN + PointRend</a></td>135<td align="center">R101-FPN</td>136<td align="center">1024×2048</td>137<td align="center">78.9</td>138<td align="center">202576688</td>139<td align="center"><a href="https://dl.fbaipublicfiles.com/detectron2/PointRend/SemanticSegmentation/pointrend_semantic_R_101_FPN_1x_cityscapes/202576688/model_final_cf6ac1.pkl">model</a> | <a href="https://dl.fbaipublicfiles.com/detectron2/PointRend/SemanticSegmentation/pointrend_semantic_R_101_FPN_1x_cityscapes/202576688/metrics.json">metrics</a></td>140</tr>141</tbody></table>142 143## <a name="CitingPointRend"></a>Citing PointRend144 145If you use PointRend, please use the following BibTeX entry.146 147```BibTeX148@InProceedings{kirillov2019pointrend,149 title={{PointRend}: Image Segmentation as Rendering},150 author={Alexander Kirillov and Yuxin Wu and Kaiming He and Ross Girshick},151 journal={ArXiv:1912.08193},152 year={2019}153}154```155 156## <a name="CitingImplicitPointRend"></a>Citing Implicit PointRend157 158If you use Implicit PointRend, please use the following BibTeX entry.159 160```BibTeX161@InProceedings{cheng2021pointly,162 title={Pointly-Supervised Instance Segmentation,163 author={Bowen Cheng and Omkar Parkhi and Alexander Kirillov},164 journal={ArXiv},165 year={2021}166}167```168 