Skip to content

Commit 50cd23b

Browse files
committed
yolov4: fix typo
1 parent 9483caf commit 50cd23b

8 files changed

+8
-8
lines changed

benchmarks.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def run_model(x):
8383
original_image = cv2.imread(FLAGS.image)
8484
original_image = cv2.cvtColor(original_image, cv2.COLOR_BGR2RGB)
8585
original_image_size = original_image.shape[:2]
86-
image_data = utils.image_preporcess(np.copy(original_image), [FLAGS.size, FLAGS.size])
86+
image_data = utils.image_preprocess(np.copy(original_image), [FLAGS.size, FLAGS.size])
8787
image_data = image_data[np.newaxis, ...].astype(np.float32)
8888
img_raw = tf.image.decode_image(
8989
open(FLAGS.image, 'rb').read(), channels=3)

convert_tflite.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def representative_data_gen():
2222
if os.path.exists(fimage[input_value]):
2323
original_image=cv2.imread(fimage[input_value])
2424
original_image = cv2.cvtColor(original_image, cv2.COLOR_BGR2RGB)
25-
image_data = utils.image_preporcess(np.copy(original_image), [FLAGS.input_size, FLAGS.input_size])
25+
image_data = utils.image_preprocess(np.copy(original_image), [FLAGS.input_size, FLAGS.input_size])
2626
img_in = image_data[np.newaxis, ...].astype(np.float32)
2727
print(input_value)
2828
yield [img_in]

convert_trt.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def representative_data_gen():
2323
if os.path.exists(fimage[input_value]):
2424
original_image=cv2.imread(fimage[input_value])
2525
original_image = cv2.cvtColor(original_image, cv2.COLOR_BGR2RGB)
26-
image_data = utils.image_preporcess(np.copy(original_image), [FLAGS.input_size, FLAGS.input_size])
26+
image_data = utils.image_preprocess(np.copy(original_image), [FLAGS.input_size, FLAGS.input_size])
2727
img_in = image_data[np.newaxis, ...].astype(np.float32)
2828
batched_input = tf.constant(img_in)
2929
print(input_value)

core/dataset.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ def parse_annotation(self, annotation):
170170
image, bboxes = self.random_translate(np.copy(image), np.copy(bboxes))
171171

172172
image = cv2.cvtColor(image, cv2.COLOR_BGR2RGB)
173-
image, bboxes = utils.image_preporcess(np.copy(image), [self.train_input_size, self.train_input_size], np.copy(bboxes))
173+
image, bboxes = utils.image_preprocess(np.copy(image), [self.train_input_size, self.train_input_size], np.copy(bboxes))
174174
return image, bboxes
175175

176176
def bbox_iou(self, boxes1, boxes2):

core/utils.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ def get_anchors(anchors_path, tiny=False):
143143
return anchors.reshape(3, 3, 2)
144144

145145

146-
def image_preporcess(image, target_size, gt_boxes=None):
146+
def image_preprocess(image, target_size, gt_boxes=None):
147147

148148
ih, iw = target_size
149149
h, w, _ = image.shape

detect.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def main(_argv):
3737
original_image = cv2.cvtColor(original_image, cv2.COLOR_BGR2RGB)
3838
original_image_size = original_image.shape[:2]
3939

40-
image_data = utils.image_preporcess(np.copy(original_image), [input_size, input_size])
40+
image_data = utils.image_preprocess(np.copy(original_image), [input_size, input_size])
4141
image_data = image_data[np.newaxis, ...].astype(np.float32)
4242
if FLAGS.framework == 'tf':
4343
input_layer = tf.keras.layers.Input([input_size, input_size, 3])

detectvideo.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ def main(_argv):
8686
else:
8787
raise ValueError("No image! Try with another video format")
8888
frame_size = frame.shape[:2]
89-
image_data = utils.image_preporcess(np.copy(frame), [input_size, input_size])
89+
image_data = utils.image_preprocess(np.copy(frame), [input_size, input_size])
9090
image_data = image_data[np.newaxis, ...].astype(np.float32)
9191
prev_time = time.time()
9292

evaluate.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ def main(_argv):
111111
predict_result_path = os.path.join(predicted_dir_path, str(num) + '.txt')
112112
# Predict Process
113113
image_size = image.shape[:2]
114-
image_data = utils.image_preporcess(np.copy(image), [INPUT_SIZE, INPUT_SIZE])
114+
image_data = utils.image_preprocess(np.copy(image), [INPUT_SIZE, INPUT_SIZE])
115115
image_data = image_data[np.newaxis, ...].astype(np.float32)
116116

117117
if FLAGS.framework == "tf":

0 commit comments

Comments
 (0)