Safemotion Lib
Loading...
Searching...
No Matches
smreid
fastreid
modeling
heads
build.py
Go to the documentation of this file.
1
# encoding: utf-8
2
"""
3
@author: liaoxingyu
4
@contact: sherlockliao01@gmail.com
5
"""
6
7
from
...utils.registry
import
Registry
8
9
REID_HEADS_REGISTRY =
Registry
(
"HEADS"
)
10
REID_HEADS_REGISTRY.__doc__ =
"""
11
Registry for ROI heads in a generalized R-CNN model.
12
ROIHeads take feature maps and region proposals, and
13
perform per-region computation.
14
The registered object will be called with `obj(cfg, input_shape)`.
15
The call is expected to return an :class:`ROIHeads`.
16
"""
17
18
19
def
build_heads
(cfg):
20
"""
21
Build REIDHeads defined by `cfg.MODEL.REID_HEADS.NAME`.
22
"""
23
head = cfg.MODEL.HEADS.NAME
24
return
REID_HEADS_REGISTRY.get(head)(cfg)
fastreid.utils.registry.Registry
Definition
registry.py:7
fastreid.modeling.heads.build.build_heads
build_heads(cfg)
Definition
build.py:19
Generated by
1.10.0