MCPcopy Create free account
hub / github.com/OpenGVLab/HumanBench / update

Method update

PATH/core/testers/utils/metrics.py:103–107  ·  view source on GitHub ↗
(self, output)

Source from the content-addressed store, hash-verified

101 self.camids = []
102
103 def update(self, output): # called once for each batch
104 feat, pid, camid = output
105 self.feats.append(feat.cpu())
106 self.pids.extend(np.asarray(pid))
107 self.camids.extend(np.asarray(camid))
108
109 def compute(self): # called after each epoch
110 feats = torch.cat(self.feats, dim=0)

Callers 2

runMethod · 0.95
extractMethod · 0.45

Calls

no outgoing calls

Tested by 2

runMethod · 0.76
extractMethod · 0.36