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

Method __init__

yolox/deepsort_tracker/reid_model.py:11–35  ·  view source on GitHub ↗
(self, c_in, c_out, is_downsample=False)

Source from the content-addressed store, hash-verified

9
10class BasicBlock(nn.Module):
11 def __init__(self, c_in, c_out, is_downsample=False):
12 super(BasicBlock, self).__init__()
13 self.is_downsample = is_downsample
14 if is_downsample:
15 self.conv1 = nn.Conv2d(
16 c_in, c_out, 3, stride=2, padding=1, bias=False)
17 else:
18 self.conv1 = nn.Conv2d(
19 c_in, c_out, 3, stride=1, padding=1, bias=False)
20 self.bn1 = nn.BatchNorm2d(c_out)
21 self.relu = nn.ReLU(True)
22 self.conv2 = nn.Conv2d(c_out, c_out, 3, stride=1,
23 padding=1, bias=False)
24 self.bn2 = nn.BatchNorm2d(c_out)
25 if is_downsample:
26 self.downsample = nn.Sequential(
27 nn.Conv2d(c_in, c_out, 1, stride=2, bias=False),
28 nn.BatchNorm2d(c_out)
29 )
30 elif c_in != c_out:
31 self.downsample = nn.Sequential(
32 nn.Conv2d(c_in, c_out, 1, stride=1, bias=False),
33 nn.BatchNorm2d(c_out)
34 )
35 self.is_downsample = True
36
37 def forward(self, x):
38 y = self.conv1(x)

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected