Skip to content

Commit

Permalink
fix bug of letterbox in calibrator.
Browse files Browse the repository at this point in the history
  • Loading branch information
mtjhl authored Apr 23, 2023
1 parent 6b9f5f4 commit b648022
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion deploy/TensorRT/calibrator.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def write_calibration_cache(self, cache):

def process_image(img_src, img_size, stride):
'''Process image before image inference.'''
image = letterbox(img_src, img_size, auto=False, return_int=True)[0]
image = letterbox(img_src, img_size, auto=False)[0]
# Convert
image = image.transpose((2, 0, 1))[::-1] # HWC to CHW, BGR to RGB
image = np.ascontiguousarray(image).astype(np.float32)
Expand Down

0 comments on commit b648022

Please sign in to comment.