Changelogs » Resnest

PyUp Safety actively tracks 273,605 Python packages for vulnerabilities and notifies you when to upgrade.

Resnest

0.0.5

Change All Models Using Wasabi Url

0.0.4

Update PyTorch S3 Url to Wasabi to save money.

0.0.3

Detectron2-ResNeSt
  
  See details in [Detectron2-ResNeSt repo](https://github.com/zhanghang1989/detectron2-ResNeSt)
  
  Object Detection on MS-COCO validation set
  
  
  <table class="tg">
  <tr>
  <th class="tg-0pky">Method</th>
  <th class="tg-0pky">Backbone</th>
  <th class="tg-0pky">mAP%</th>
  </tr>
  <tr>
  <td rowspan="4" class="tg-0pky">Faster R-CNN</td>
  <td class="tg-0pky">ResNet-50</td>
  <td class="tg-0pky">39.25</td>
  </tr>
  <tr>
  <td class="tg-0lax">ResNet-101</td>
  <td class="tg-0lax">41.37</td>
  </tr>
  <tr>
  <td class="tg-0lax">ResNeSt-50 (<span style="color:red">ours</span>)</td>
  <td class="tg-0lax"><b>42.33</b></td>
  </tr>
  <tr>
  <td class="tg-0lax">ResNeSt-101 (<span style="color:red">ours</span>)</td>
  <td class="tg-0lax"><b>44.72</b></td>
  </tr>
  <tr>
  <td rowspan="5" class="tg-0lax">Cascade R-CNN</td>
  <td class="tg-0lax">ResNet-50</td>
  <td class="tg-0lax">42.52</td>
  </tr>
  <tr>
  <td class="tg-0lax">ResNet-101</td>
  <td class="tg-0lax">44.03</td>
  </tr>
  <tr>
  <td class="tg-0lax">ResNeSt-50 (<span style="color:red">ours</span>)</td>
  <td class="tg-0lax"><b>45.41</b></td>
  </tr>
  <tr>
  <td class="tg-0lax">ResNeSt-101 (<span style="color:red">ours</span>)</td>
  <td class="tg-0lax"><b>47.50</b></td>
  </tr>
  <tr>
  <td class="tg-0lax">ResNeSt-200 (<span style="color:red">ours</span>)</td>
  <td class="tg-0lax"><b>49.03</b></td>
  </tr>
  </table>
  
  Instance Segmentation
  
  
  <table class="tg">
  <tr>
  <th class="tg-0pky">Method</th>
  <th class="tg-0pky">Backbone</th>
  <th class="tg-0pky">bbox</th>
  <th class="tg-0lax">mask</th>
  </tr>
  <tr>
  <td rowspan="4" class="tg-0pky">Mask R-CNN</td>
  <td class="tg-0pky">ResNet-50</td>
  <td class="tg-0pky">39.97</td>
  <td class="tg-0lax">36.05</td>
  </tr>
  <tr>
  <td class="tg-0lax">ResNet-101</td>
  <td class="tg-0lax">41.78</td>
  <td class="tg-0lax">37.51</td>
  </tr>
  <tr>
  <td class="tg-0lax">ResNeSt-50 (<span style="color:red">ours</span>)</td>
  <td class="tg-0lax"><b>42.81</b></td>
  <td class="tg-0lax"><b>38.14</td>
  </tr>
  <tr>
  <td class="tg-0lax">ResNeSt-101 (<span style="color:red">ours</span>)</td>
  <td class="tg-0lax"><b>45.75</b></td>
  <td class="tg-0lax"><b>40.65</b></td>
  </tr>
  <tr>
  <td rowspan="4" class="tg-0lax">Cascade R-CNN</td>
  <td class="tg-0lax">ResNet-50</td>
  <td class="tg-0lax">43.06</td>
  <td class="tg-0lax">37.19</td>
  </tr>
  <tr>
  <td class="tg-0lax">ResNet-101</td>
  <td class="tg-0lax">44.79</td>
  <td class="tg-0lax">38.52</td>
  </tr>
  <tr>
  <td class="tg-0lax">ResNeSt-50 (<span style="color:red">ours</span>)</td>
  <td class="tg-0lax"><b>46.19</b></td>
  <td class="tg-0lax"><b>39.55</b></td>
  </tr>
  <tr>
  <td class="tg-0lax">ResNeSt-101 (<span style="color:red">ours</span>)</td>
  <td class="tg-0lax"><b>48.30</b></td>
  <td class="tg-0lax"><b>41.56</b></td>
  </tr>
  </table>
  
  Semantic Segmentation with New SoTA on ADE20K
  
  Semantic Segmentation
  
  - PyTorch models and training: Please visit [PyTorch Encoding Toolkit](https://hangzhang.org/PyTorch-Encoding/model_zoo/segmentation.html).
  - Training with Gluon: Please visit [GluonCV Toolkit](https://gluon-cv.mxnet.io/model_zoo/segmentation.htmlade20k-dataset).
  
  Results on ADE20K
  
  <table class="tg">
  <tr>
  <th class="tg-cly1">Method</th>
  <th class="tg-cly1">Backbone</th>
  <th class="tg-cly1">pixAcc%</th>
  <th class="tg-cly1">mIoU%</th>
  </tr>
  <tr>
  <td rowspan="5" class="tg-cly1">Deeplab-V3<br></td>
  <td class="tg-cly1">ResNet-50</td>
  <td class="tg-cly1">80.39</td>
  <td class="tg-cly1">42.1</td>
  </tr>
  <tr>
  <td class="tg-cly1">ResNet-101</td>
  <td class="tg-cly1">81.11</b></td>
  <td class="tg-cly1">44.14</b></td>
  </tr>
  <tr>
  <td class="tg-cly1">ResNeSt-50 (<span style="color:red">ours</span>)</td>
  <td class="tg-cly1"><b>81.17</b></td>
  <td class="tg-cly1"><b>45.12</b></td>
  </tr>
  <tr>
  <td class="tg-0lax">ResNeSt-101 (<span style="color:red">ours</span>)</td>
  <td class="tg-0lax"><b>82.07</td>
  <td class="tg-0lax"><b>46.91</b></td>
  </tr>
  <tr>
  <td class="tg-0lax">ResNeSt-269 (<span style="color:red">ours</span>)</td>
  <td class="tg-0lax"><b>82.62</td>
  <td class="tg-0lax"><b>47.60</b></td>
  </tr>
  </table>
  
  Ablation Study Models
  
  |                 | setting | P    | GFLOPs | PyTorch | Gluon |
  |-----------------|---------|-------|--------|---------|-------|
  | ResNeSt-50-fast | 1s1x64d | 26.3M | 4.34   | 80.33   | 80.35 |
  | ResNeSt-50-fast | 2s1x64d | 27.5M | 4.34   | 80.53   | 80.65 |
  | ResNeSt-50-fast | 4s1x64d | 31.9M | 4.35   | 80.76   | 80.90 |
  | ResNeSt-50-fast | 1s2x40d | 25.9M | 4.38   | 80.59   | 80.72 |
  | ResNeSt-50-fast | 2s2x40d | 26.9M | 4.38   | 80.61   | 80.84 |
  | ResNeSt-50-fast | 4s2x40d | 30.4M | 4.41   | 81.14   | 81.17 |
  | ResNeSt-50-fast | 1s4x24d | 25.7M | 4.42   | 80.99   | 80.97 |
  
  ImageNet Training with MXNet Gluon
  
  Install MXNet with Horovod
  
  bash
  assuming you have CUDA 10.0 on your machine
  pip install mxnet-cu100
  HOROVOD_GPU_ALLREDUCE=NCCL pip install -v --no-cache-dir horovod
  pip install --no-cache mpi4py
  
  
  Prepare ImageNet recordio data format
  
  - Unfortunately ,this is required for training using MXNet Gluon. Please follow the [GluonCV tutorial](https://gluon-cv.mxnet.io/build/examples_datasets/recordio.html) to prepare the data.
  - Copy the data into ramdisk (optional):
  
  
  cd ~/
  sudo mkdir -p /media/ramdisk
  sudo mount -t tmpfs -o size=200G tmpfs /media/ramdisk
  cp -r /home/ubuntu/data/ILSVRC2012/ /media/ramdisk
  
  
  Training command
  
  Using ResNeSt-50 as the target model:
  
  bash
  horovodrun -np 64 --hostfile hosts python train.py \
  --rec-train /media/ramdisk/ILSVRC2012/train.rec \
  --rec-val /media/ramdisk/ILSVRC2012/val.rec \
  --model resnest50 --lr 0.05 --num-epochs 270 --batch-size 128 \
  --use-rec --dtype float32 --warmup-epochs 5 --last-gamma --no-wd \
  --label-smoothing --mixup --save-dir params_ resnest50 \
  --log-interval 50 --eval-frequency 5 --auto_aug --input-size 224
  
  
  Verify pretrained model
  
  bash
  python verify.py --model resnest50 --crop-size 224 --resume params_ resnest50/imagenet-resnest50-269.params

0.0.2

Pretrained Models
  
  |             | crop size | PyTorch | Gluon |
  |-------------|-----------|---------|-------|
  | ResNeSt-50  | 224       | 81.03   | 81.04 |
  | ResNeSt-101 | 256       | 82.83   | 82.81 |
  | ResNeSt-200 | 320       | 83.84   | 83.88 |
  | ResNeSt-269 | 416       | 84.54   | 84.53 |
  
  PyTorch Models
  
  - Load using Torch Hub
  
  python
  import torch
  get list of models
  torch.hub.list('zhanghang1989/ResNeSt', force_reload=True)
  
  load pretrained models, using ResNeSt-50 as an example
  net = torch.hub.load('zhanghang1989/ResNeSt', 'resnest50', pretrained=True)
  
  
  
  - Load using python package
  
  python
  using ResNeSt-50 as an example
  from resnest.torch import resnest50
  net = resnest50(pretrained=True)
  
  
  
  Gluon Models
  
  - Load pretrained model:
  
  python
  using ResNeSt-50 as an example
  from resnest.gluon import resnest50
  net = resnest50(pretrained=True)