DarkNetV3¶
The DarkNetV3 model is based on the "YOLOv3: An Incremental Improvement" paper.
Architecture overview¶
This paper makes a more powerful version than its predecedors by increasing depth and using ResNet tricks.
The key takeaways from the paper are the following:
- adds residual connection compared to DarkNetV2
Model builders¶
The following model builders can be used to instantiate a DarknetV3 model, with or
without pre-trained weights. All the model builders internally rely on the
DarknetV3 base class.
DarknetV3
¶
DarknetV3(layout: list[tuple[int, int]], num_classes: int = 10, in_channels: int = 3, stem_channels: int = 32, act_layer: Module | None = None, norm_layer: Callable[[int], Module] | None = None, drop_layer: Callable[..., Module] | None = None, conv_layer: Callable[..., Module] | None = None)
Bases: Sequential
Source code in holocron/models/classification/darknetv3.py
darknet53
¶
darknet53(pretrained: bool = False, checkpoint: Checkpoint | None = None, progress: bool = True, **kwargs: Any) -> DarknetV3
Darknet-53 from "YOLOv3: An Incremental Improvement"
| PARAMETER | DESCRIPTION |
|---|---|
pretrained
|
If True, returns a model pre-trained on ImageNet
TYPE:
|
checkpoint
|
If specified, the model's parameters will be set to the checkpoint's values
TYPE:
|
progress
|
If True, displays a progress bar of the download to stderr
TYPE:
|
kwargs
|
keyword args of
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
DarknetV3
|
classification model |
Darknet53_Checkpoint
¶
Bases: Enum
IMAGENETTE
class-attribute
instance-attribute
¶
IMAGENETTE = _checkpoint(arch='darknet53', url='https://github.com/frgfm/Holocron/releases/download/v0.2.1/darknet53_224-5015f3fd.pth', acc1=0.9417, acc5=0.9957, sha256='5015f3fdf0963342e0c54790127350375ba269d871feed48f8328b2e43cf7819', size=162584273, num_params=40595178, commit='6e32c5b578711a2ef3731a8f8c61760ed9f03e58', train_args='./imagenette2-320/ --arch darknet53 --batch-size 64 --mixup-alpha 0.2 --amp --device 0 --epochs 100 --lr 1e-3 --label-smoothing 0.1 --random-erase 0.1 --train-crop-size 176 --val-resize-size 232 --opt adamw --weight-decay 5e-2')