Browse Source

Console corrupted -> corrupt (#6338)

* Console corrupted -> corrupt 

Minor style changes.

* Update export.py
modifyDataloader
Glenn Jocher GitHub 2 years ago
parent
commit
fd55271c04
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 5 deletions
  1. +1
    -2
      export.py
  2. +3
    -3
      utils/datasets.py

+ 1
- 2
export.py View File

assert not (tflite and tfjs), 'TFLite and TF.js models must be exported separately, please pass only one type.' assert not (tflite and tfjs), 'TFLite and TF.js models must be exported separately, please pass only one type.'
model, f = export_saved_model(model, im, file, dynamic, tf_nms=nms or agnostic_nms or tfjs, model, f = export_saved_model(model, im, file, dynamic, tf_nms=nms or agnostic_nms or tfjs,
agnostic_nms=agnostic_nms or tfjs, topk_per_class=topk_per_class, agnostic_nms=agnostic_nms or tfjs, topk_per_class=topk_per_class,
topk_all=topk_all,
conf_thres=conf_thres, iou_thres=iou_thres) # keras model
topk_all=topk_all, conf_thres=conf_thres, iou_thres=iou_thres) # keras model
if pb or tfjs: # pb prerequisite to tfjs if pb or tfjs: # pb prerequisite to tfjs
f = export_pb(model, im, file) f = export_pb(model, im, file)
if tflite or edgetpu: if tflite or edgetpu:

+ 3
- 3
utils/datasets.py View File

cache, exists = self.cache_labels(cache_path, prefix), False # cache cache, exists = self.cache_labels(cache_path, prefix), False # cache


# Display cache # Display cache
nf, nm, ne, nc, n = cache.pop('results') # found, missing, empty, corrupted, total
nf, nm, ne, nc, n = cache.pop('results') # found, missing, empty, corrupt, total
if exists: if exists:
d = f"Scanning '{cache_path}' images and labels... {nf} found, {nm} missing, {ne} empty, {nc} corrupted"
d = f"Scanning '{cache_path}' images and labels... {nf} found, {nm} missing, {ne} empty, {nc} corrupt"
tqdm(None, desc=prefix + d, total=n, initial=n) # display cache results tqdm(None, desc=prefix + d, total=n, initial=n) # display cache results
if cache['msgs']: if cache['msgs']:
LOGGER.info('\n'.join(cache['msgs'])) # display warnings LOGGER.info('\n'.join(cache['msgs'])) # display warnings
x[im_file] = [l, shape, segments] x[im_file] = [l, shape, segments]
if msg: if msg:
msgs.append(msg) msgs.append(msg)
pbar.desc = f"{desc}{nf} found, {nm} missing, {ne} empty, {nc} corrupted"
pbar.desc = f"{desc}{nf} found, {nm} missing, {ne} empty, {nc} corrupt"


pbar.close() pbar.close()
if msgs: if msgs:

Loading…
Cancel
Save