mirror of https://github.com/JDAI-CV/fast-reid.git
parent
74a6938289
commit
1f4e4909eb
|
@ -70,16 +70,16 @@ class FeatureExtractionDemo(object):
|
||||||
if cnt >= buffer_size:
|
if cnt >= buffer_size:
|
||||||
batch = batch_data.popleft()
|
batch = batch_data.popleft()
|
||||||
predictions = self.predictor.get()
|
predictions = self.predictor.get()
|
||||||
yield predictions, batch["targets"].numpy(), batch["camid"].numpy()
|
yield predictions, batch["targets"].numpy(), batch["camids"].numpy()
|
||||||
|
|
||||||
while len(batch_data):
|
while len(batch_data):
|
||||||
batch = batch_data.popleft()
|
batch = batch_data.popleft()
|
||||||
predictions = self.predictor.get()
|
predictions = self.predictor.get()
|
||||||
yield predictions, batch["targets"].numpy(), batch["camid"].numpy()
|
yield predictions, batch["targets"].numpy(), batch["camids"].numpy()
|
||||||
else:
|
else:
|
||||||
for batch in data_loader:
|
for batch in data_loader:
|
||||||
predictions = self.predictor(batch["images"])
|
predictions = self.predictor(batch["images"])
|
||||||
yield predictions, batch["targets"].numpy(), batch["camid"].numpy()
|
yield predictions, batch["targets"].numpy(), batch["camids"].numpy()
|
||||||
|
|
||||||
|
|
||||||
class AsyncPredictor:
|
class AsyncPredictor:
|
||||||
|
|
Loading…
Reference in New Issue