Skip to content

Commit

Permalink
Fix tf.py LoadImages() dataloader return values (ultralytics#5455)
Browse files Browse the repository at this point in the history
  • Loading branch information
glenn-jocher committed Nov 2, 2021
1 parent 09bdabc commit 1594d42
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion models/tf.py
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ def _nms(x, topk_all=100, iou_thres=0.45, conf_thres=0.25): # agnostic NMS

def representative_dataset_gen(dataset, ncalib=100):
# Representative dataset generator for use with converter.representative_dataset, returns a generator of np arrays
for n, (path, img, im0s, vid_cap) in enumerate(dataset):
for n, (path, img, im0s, vid_cap, string) in enumerate(dataset):
input = np.transpose(img, [1, 2, 0])
input = np.expand_dims(input, axis=0).astype(np.float32)
input /= 255.0
Expand Down

0 comments on commit 1594d42

Please sign in to comment.