Overview of the models used for CV in fastai

Computer Vision models zoo

On top of the models offered by torchivision, the fastai library has implementations for the following models:

  • Darknet architecture, which is the base of Yolo v3
  • Unet architecture based on a pretrained model. The original unet is described here, the model implementation is detailed in models.unet
  • Wide resnets architectures, as introduced in this article.

class Darknet[source]

Darknet(num_blocks:Collection[int], num_classes:int, nf=32) :: Module

Create a Darknet with blocks of sizes given in num_blocks, ending with num_classes and using nf initial features. Darknet53 uses num_blocks = [1,2,8,8,4].

class WideResNet[source]

WideResNet(num_groups:int, N:int, num_classes:int, k:int=1, drop_p:float=0.0, start_nf:int=16) :: Module

Create a wide resnet with blocks num_groups groups, each containing blocks of size N. k is the width of the resnet, start_nf the initial number of features. Dropout of drop_p is applied at the end of each block.



Creates a wide resnet for CIFAR-10 with num_groups=3, N=3, k=6 and drop_p=0..