1class Baseline(nn.Module):
2 """
3 Baseline architecture. Any models that contains the following two components:
4 1. Per-image feature extraction (aka backbone)
5 2. Per-image feature aggregation and loss computation
6 """
fastreid不仅具有系统配置可管理(Manageable system configuration)的优点,同时其还有模块化和可扩展性的特性(Modular and extensible design),这也使得该项目的灵活性大大增强。
如图所示,fastreid提供了丰富的backbone可供选择,如:resnet、vit等等。
该部分用于对上一阶段经过预处理后的图片进行特征提取,得到对应的特征图。
更改backbone需要在最底层的配置文件Base-bagtricks.yml中更改对应的Backbone name,如下如所示: