{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "## Computer Vision models zoo" ] }, { "cell_type": "code", "execution_count": 1, "metadata": { "hide_input": true }, "outputs": [], "source": [ "from fastai.gen_doc.nbdoc import *\n", "from fastai.vision.models.darknet import Darknet\n", "from fastai.vision.models.wrn import wrn_22, WideResNet" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The fastai library includes several pretrained models from [torchvision](https://pytorch.org/docs/stable/torchvision/models.html), namely:\n", "- resnet18, resnet34, resnet50, resnet101, resnet152\n", "- squeezenet1_0, squeezenet1_1\n", "- densenet121, densenet169, densenet201, densenet161\n", "- vgg16_bn, vgg19_bn\n", "- alexnet\n", "\n", "On top of the models offered by torchvision, fastai has implementations for the following models:\n", "- Darknet architecture, which is the base of [Yolo v3](https://pjreddie.com/media/files/papers/YOLOv3.pdf)\n", "- Unet architecture based on a pretrained model. The original unet is described [here](https://arxiv.org/abs/1505.04597), the model implementation is detailed in [`models.unet`](/vision.models.unet.html#vision.models.unet)\n", "- Wide resnets architectures, as introduced in [this article](https://arxiv.org/abs/1605.07146)" ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "hide_input": true }, "outputs": [ { "data": { "text/markdown": [ "
class
Darknet
[source][test]Darknet
(**`num_blocks`**:`Collection`\\[`int`\\], **`num_classes`**:`int`, **`nf`**=***`32`***) :: [`PrePostInitMeta`](/core.html#PrePostInitMeta) :: [`Module`](/torch_core.html#Module)\n",
"\n",
"No tests found for Darknet
. To contribute a test please refer to this guide and this discussion.
class
WideResNet
[source][test]WideResNet
(**`num_groups`**:`int`, **`N`**:`int`, **`num_classes`**:`int`, **`k`**:`int`=***`1`***, **`drop_p`**:`float`=***`0.0`***, **`start_nf`**:`int`=***`16`***, **`n_in_channels`**:`int`=***`3`***) :: [`PrePostInitMeta`](/core.html#PrePostInitMeta) :: [`Module`](/torch_core.html#Module)\n",
"\n",
"No tests found for WideResNet
. To contribute a test please refer to this guide and this discussion.
wrn_22
[source][test]wrn_22
()\n",
"\n",
"No tests found for wrn_22
. To contribute a test please refer to this guide and this discussion.