From 45c4589e3d171455222a685d7a6289a67c0639e0 Mon Sep 17 00:00:00 2001 From: kaiyangzhou Date: Wed, 11 Aug 2021 17:00:39 +0800 Subject: [PATCH] update doc --- MODEL_ZOO.html | 12 ++++ _modules/torchreid/models/__init__.html | 5 +- _modules/torchreid/models/osnet_ain.html | 70 +++++++++++++++++++++++- _modules/torchreid/utils/torchtools.html | 1 + _sources/MODEL_ZOO.md.txt | 3 + index.html | 1 + searchindex.js | 2 +- 7 files changed, 90 insertions(+), 4 deletions(-) diff --git a/MODEL_ZOO.html b/MODEL_ZOO.html index ced7633..e6739c6 100644 --- a/MODEL_ZOO.html +++ b/MODEL_ZOO.html @@ -240,6 +240,18 @@ osnet_ain_x1_0 model + +osnet_ain_x0_75 +model + + +osnet_ain_x0_5 +model + + +osnet_ain_x0_25 +model +
diff --git a/_modules/torchreid/models/__init__.html b/_modules/torchreid/models/__init__.html index 4a847d3..bb328e0 100644 --- a/_modules/torchreid/models/__init__.html +++ b/_modules/torchreid/models/__init__.html @@ -241,7 +241,10 @@ 'osnet_x0_5': osnet_x0_5, 'osnet_x0_25': osnet_x0_25, 'osnet_ibn_x1_0': osnet_ibn_x1_0, - 'osnet_ain_x1_0': osnet_ain_x1_0 + 'osnet_ain_x1_0': osnet_ain_x1_0, + 'osnet_ain_x0_75': osnet_ain_x0_75, + 'osnet_ain_x0_5': osnet_ain_x0_5, + 'osnet_ain_x0_25': osnet_ain_x0_25 } diff --git a/_modules/torchreid/models/osnet_ain.html b/_modules/torchreid/models/osnet_ain.html index 180fc99..5e02123 100644 --- a/_modules/torchreid/models/osnet_ain.html +++ b/_modules/torchreid/models/osnet_ain.html @@ -174,11 +174,17 @@ from torch import nn from torch.nn import functional as F -__all__ = ['osnet_ain_x1_0'] +__all__ = ['osnet_ain_x1_0', 'osnet_ain_x0_75', 'osnet_ain_x0_5', 'osnet_ain_x0_25'] pretrained_urls = { 'osnet_ain_x1_0': - 'https://drive.google.com/uc?id=1-CaioD9NaqbHK_kzSMW8VE4_3KcsRjEo' + 'https://drive.google.com/uc?id=1-CaioD9NaqbHK_kzSMW8VE4_3KcsRjEo', + 'osnet_ain_x0_75': + 'https://drive.google.com/uc?id=1apy0hpsMypqstfencdH-jKIUEFOW4xoM', + 'osnet_ain_x0_5': + 'https://drive.google.com/uc?id=1KusKvEYyKGDTUBVRxRiz55G31wkihB6l', + 'osnet_ain_x0_25': + 'https://drive.google.com/uc?id=1SxQt2AvmEcgWNhaRb2xC4rP6ZwVDP0Wt' } @@ -709,6 +715,66 @@ if pretrained: init_pretrained_weights(model, key='osnet_ain_x1_0') return model + + +def osnet_ain_x0_75( + num_classes=1000, pretrained=True, loss='softmax', **kwargs +): + model = OSNet( + num_classes, + blocks=[ + [OSBlockINin, OSBlockINin], [OSBlock, OSBlockINin], + [OSBlockINin, OSBlock] + ], + layers=[2, 2, 2], + channels=[48, 192, 288, 384], + loss=loss, + conv1_IN=True, + **kwargs + ) + if pretrained: + init_pretrained_weights(model, key='osnet_ain_x0_75') + return model + + +def osnet_ain_x0_5( + num_classes=1000, pretrained=True, loss='softmax', **kwargs +): + model = OSNet( + num_classes, + blocks=[ + [OSBlockINin, OSBlockINin], [OSBlock, OSBlockINin], + [OSBlockINin, OSBlock] + ], + layers=[2, 2, 2], + channels=[32, 128, 192, 256], + loss=loss, + conv1_IN=True, + **kwargs + ) + if pretrained: + init_pretrained_weights(model, key='osnet_ain_x0_5') + return model + + +def osnet_ain_x0_25( + num_classes=1000, pretrained=True, loss='softmax', **kwargs +): + model = OSNet( + num_classes, + blocks=[ + [OSBlockINin, OSBlockINin], [OSBlock, OSBlockINin], + [OSBlockINin, OSBlock] + ], + layers=[2, 2, 2], + channels=[16, 64, 96, 128], + loss=loss, + conv1_IN=True, + **kwargs + ) + if pretrained: + init_pretrained_weights(model, key='osnet_ain_x0_25') + return model
diff --git a/_modules/torchreid/utils/torchtools.html b/_modules/torchreid/utils/torchtools.html index a2e536a..1bb96e3 100644 --- a/_modules/torchreid/utils/torchtools.html +++ b/_modules/torchreid/utils/torchtools.html @@ -247,6 +247,7 @@ """ if fpath is None: raise ValueError('File path is None') + fpath = osp.abspath(osp.expanduser(fpath)) if not osp.exists(fpath): raise FileNotFoundError('File is not found at "{}"'.format(fpath)) map_location = None if torch.cuda.is_available() else 'cpu' diff --git a/_sources/MODEL_ZOO.md.txt b/_sources/MODEL_ZOO.md.txt index 682bed6..c14afe3 100644 --- a/_sources/MODEL_ZOO.md.txt +++ b/_sources/MODEL_ZOO.md.txt @@ -22,6 +22,9 @@ | osnet_x0_25 | [model](https://drive.google.com/file/d/1rb8UN5ZzPKRc_xvtHlyDh-cSz88YX9hs/view?usp=sharing) | | osnet_ibn_x1_0 | [model](https://drive.google.com/file/d/1sr90V6irlYYDd4_4ISU2iruoRG8J__6l/view?usp=sharing) | | osnet_ain_x1_0 | [model](https://drive.google.com/file/d/1-CaioD9NaqbHK_kzSMW8VE4_3KcsRjEo/view?usp=sharing) | +| osnet_ain_x0_75 | [model](https://drive.google.com/file/d/1apy0hpsMypqstfencdH-jKIUEFOW4xoM/view?usp=sharing) | +| osnet_ain_x0_5 | [model](https://drive.google.com/file/d/1KusKvEYyKGDTUBVRxRiz55G31wkihB6l/view?usp=sharing) | +| osnet_ain_x0_25 | [model](https://drive.google.com/file/d/1SxQt2AvmEcgWNhaRb2xC4rP6ZwVDP0Wt/view?usp=sharing) | ## Same-domain ReID diff --git a/index.html b/index.html index 2a978c9..df1411d 100644 --- a/index.html +++ b/index.html @@ -197,6 +197,7 @@

What’s new