MCPcopy Create free account
hub / github.com/ChenhongyiYang/QueryDet-PyTorch / test

Method test

models/querydet/detector.py:208–219  ·  view source on GitHub ↗
(self, batched_inputs)

Source from the content-addressed store, hash-verified

206 return losses
207
208 def test(self, batched_inputs):
209 images = self.preprocess_image(batched_inputs)
210 results, total_time = self.test_forward(images) # normal test
211 processed_results = []
212 for results_per_image, input_per_image, image_size in zip(
213 results, batched_inputs, images.image_sizes
214 ):
215 height = input_per_image.get("height", image_size[0])
216 width = input_per_image.get("width", image_size[1])
217 r = detector_postprocess(results_per_image, height, width)
218 processed_results.append({"instances": r, 'time':total_time})
219 return processed_results
220
221 def test_forward(self, images):
222 start_event = Event(enable_timing=True)

Callers 1

forwardMethod · 0.95

Calls 2

preprocess_imageMethod · 0.95
test_forwardMethod · 0.95

Tested by

no test coverage detected