YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
---
license: bsd-3-clause
tags:
- vision
- pytorch
- torchvision
- ferrotorch
---
# `ferrotorch/deeplabv3_resnet50`
DeepLabV3 with ResNet-50 backbone, pretrained on a COCO subset with Pascal VOC labels (21 classes). Re-keyed from torchvision 0.21 `deeplabv3_resnet50` (`DeepLabV3_ResNet50_Weights.COCO_WITH_VOC_LABELS_V1`).
## Provenance
* Upstream factory: `torchvision.models.deeplabv3_resnet50`
with `weights="COCO_WITH_VOC_LABELS_V1"` (torchvision 0.21).
* Conversion script: [`ferrotorch/scripts/pin_pretrained_weights.py`](https://github.com/dollspace/ferrotorch/blob/main/scripts/pin_pretrained_weights.py).
* Ferrotorch issue: <https://github.com/dollspace/ferrotorch/issues/1130>.
* Number of trainable parameters in upstream torchvision model: **42,004,074**.
* SHA-256 of `model.safetensors` (this file is pinned in
`ferrotorch-hub/src/registry.rs`): `88133b09e057aa20609436d8333ca812378a7bc727fe305275e2690eb2375dc1`.
## How to load
```rust
use ferrotorch_vision::models::registry::get_model;
let model = get_model("deeplabv3_resnet50", /* pretrained = */ true, /* num_classes = */ 21).unwrap();
```
The loader downloads this file, verifies SHA-256, then calls
`Module::load_state_dict(state_dict, strict=false)`. `strict=false`
is required because ferrotorch's `Module::named_parameters()` does
not yet expose `BatchNorm2d` running statistics
(`running_mean` / `running_var`), so those keys in this safetensors
file are intentionally ignored at load time until ferrotorch
issue #995 closes. They are still included here so re-uploading
is unnecessary once that work lands.
## Conversion notes
The following upstream torchvision keys are intentionally dropped because the ferrotorch architecture does not have a corresponding parameter slot:
aux_classifier.0.weightaux_classifier.1.biasaux_classifier.1.num_batches_trackedaux_classifier.1.running_meanaux_classifier.1.running_varaux_classifier.1.weightaux_classifier.4.biasaux_classifier.4.weight
For FPN bias drops this is a known mismatch between torchvision's nn.Conv2d(..., bias=True) FPN convolutions and ferrotorch's bias=False FPN convolutions. For aux_classifier.* drops the ferrotorch DeepLabV3 / FCN implementations do not expose an aux head.
## Upstream license (verbatim, torchvision 0.21 `LICENSE`)
```
BSD 3-Clause License
Copyright (c) Soumith Chintala 2016,
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
```
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support