Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve example quantization with yolo #464

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions quantization/object_detection/trt/yolov3/data_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def get_next(self):
def load_serial(self):
width = self.width
height = self.height
nchw_data_list, filename_list, image_size_list = preprocess_func(self.image_folder, height, width,
nchw_data_list, filename_list, image_size_list = self.preprocess_func(self.image_folder, height, width,
self.start_index, self.stride)
input_name = self.input_name

Expand Down Expand Up @@ -131,7 +131,7 @@ def load_batches(self):
for index in range(0, stride, batch_size):
start_index = self.start_index + index
print("Load batch from index %s ..." % (str(start_index)))
nchw_data_list, filename_list, image_size_list = preprocess_func(self.image_folder, height, width,
nchw_data_list, filename_list, image_size_list = self.preprocess_func(self.image_folder, height, width,
start_index, batch_size)

if nchw_data_list.size == 0:
Expand Down Expand Up @@ -225,7 +225,7 @@ def load_batches(self):
for index in range(0, stride, batch_size):
start_index = self.start_index + index
print("Load batch from index %s ..." % (str(start_index)))
nchw_data_list, filename_list, image_size_list = preprocess_func(
nchw_data_list, filename_list, image_size_list = self.preprocess_func(
self.image_folder, height, width, start_index, batch_size)

if nchw_data_list.size == 0:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def get_calibration_table(model_path, augmented_model_path, calibration_dataset)
# data_reader = YoloV3DataReader(calibration_dataset, stride=1000, batch_size=20, model_path=augmented_model_path)
# calibrator.collect_data(data_reader)

write_calibration_table(calibrator.compute_range())
write_calibration_table(calibrator.compute_data())
print('calibration table generated and saved.')


Expand Down
Loading