# Faster RCNN yields hundred maches every time

**URL:** <https://discuss.pytorch.org/t/faster-rcnn-yields-hundred-maches-every-time/100279>\
**Category:** vision\
**Created:** [October 22, 2020, 1:49pm UTC](https://discuss.pytorch.org/t/faster-rcnn-yields-hundred-maches-every-time/100279 "2020-10-22T13:49:49Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![vahvero](https://discuss.pytorch.org/letter_avatar_proxy/v4/letter/v/5e9695/32.png) [@vahvero](https://discuss.pytorch.org/u/vahvero)\
**Post date:** [October 26, 2020, 8:58am UTC](https://discuss.pytorch.org/t/faster-rcnn-yields-hundred-maches-every-time/100279/3 "2020-10-26T08:58:21Z")

</div>

Transforming

```auto
def create_model(pretrained=False, num_classes=2):
        """Creates faster rcnn 50 model

        Args:
            pretrained (bool): To use Coco pretrained
            num_classes (int): Number of output classes
        """
        return tv.models.detection.fasterrcnn_resnet50_fpn(
            pretrained=pretrained,
            num_classes=num_classes,
            pretrained_backbone=True)

```

to

```auto
def create_model(pretrained=False, num_classes=2):
        """Creates faster rcnn 50 model

        Args:
            pretrained (bool): To use Coco pretrained
            num_classes (int): Number of output classes
        """
        return tv.models.detection.fasterrcnn_resnet50_fpn(
            pretrained=pretrained,
            num_classes=num_classes,
            pretrained_backbone=True,
            box_detections_per_img=1000)

```

solved first part of the problem.

---

_[View the full topic](https://discuss.pytorch.org/t/faster-rcnn-yields-hundred-maches-every-time/100279)._
