MCPcopy Create free account
hub / github.com/FoundationVision/ByteTrack / get_model

Method get_model

exps/default/yolov3.py:19–33  ·  view source on GitHub ↗
(self, sublinear=False)

Source from the content-addressed store, hash-verified

17 self.exp_name = os.path.split(os.path.realpath(__file__))[1].split(".")[0]
18
19 def get_model(self, sublinear=False):
20 def init_yolo(M):
21 for m in M.modules():
22 if isinstance(m, nn.BatchNorm2d):
23 m.eps = 1e-3
24 m.momentum = 0.03
25 if "model" not in self.__dict__:
26 from yolox.models import YOLOX, YOLOFPN, YOLOXHead
27 backbone = YOLOFPN()
28 head = YOLOXHead(self.num_classes, self.width, in_channels=[128, 256, 512], act="lrelu")
29 self.model = YOLOX(backbone, head)
30 self.model.apply(init_yolo)
31 self.model.head.initialize_biases(1e-2)
32
33 return self.model
34
35 def get_data_loader(self, batch_size, is_distributed, no_aug=False):
36 from data.datasets.cocodataset import COCODataset

Callers

nothing calls this directly

Calls 4

YOLOFPNClass · 0.90
YOLOXHeadClass · 0.90
YOLOXClass · 0.90
initialize_biasesMethod · 0.80

Tested by

no test coverage detected