Skip to content
  • Jiacong Fang's avatar
    Add TensorFlow and TFLite export (#1127) · 808bcad3
    Jiacong Fang authored
    
    
    * Add models/tf.py for TensorFlow and TFLite export
    
    * Set auto=False for int8 calibration
    
    * Update requirements.txt for TensorFlow and TFLite export
    
    * Read anchors directly from PyTorch weights
    
    * Add --tf-nms to append NMS in TensorFlow SavedModel and GraphDef export
    
    * Remove check_anchor_order, check_file, set_logging from import
    
    * Reformat code and optimize imports
    
    * Autodownload model and check cfg
    
    * update --source path, img-size to 320, single output
    
    * Adjust representative_dataset
    
    * Put representative dataset in tfl_int8 block
    
    * detect.py TF inference
    
    * weights to string
    
    * weights to string
    
    * cleanup tf.py
    
    * Add --dynamic-batch-size
    
    * Add xywh normalization to reduce calibration error
    
    * Update requirements.txt
    
    TensorFlow 2.3.1 -> 2.4.0 to avoid int8 quantization error
    
    * Fix imports
    
    Move C3 from models.experimental to models.common
    
    * Add models/tf.py for TensorFlow and TFLite export
    
    * Set auto=False for int8 calibration
    
    * Update requirements.txt for TensorFlow and TFLite export
    
    * Read anchors directly from PyTorch weights
    
    * Add --tf-nms to append NMS in TensorFlow SavedModel and GraphDef export
    
    * Remove check_anchor_order, check_file, set_logging from import
    
    * Reformat code and optimize imports
    
    * Autodownload model and check cfg
    
    * update --source path, img-size to 320, single output
    
    * Adjust representative_dataset
    
    * detect.py TF inference
    
    * Put representative dataset in tfl_int8 block
    
    * weights to string
    
    * weights to string
    
    * cleanup tf.py
    
    * Add --dynamic-batch-size
    
    * Add xywh normalization to reduce calibration error
    
    * Update requirements.txt
    
    TensorFlow 2.3.1 -> 2.4.0 to avoid int8 quantization error
    
    * Fix imports
    
    Move C3 from models.experimental to models.common
    
    * implement C3() and SiLU()
    
    * Fix reshape dim to support dynamic batching
    
    * Add epsilon argument in tf_BN, which is different between TF and PT
    
    * Set stride to None if not using PyTorch, and do not warmup without PyTorch
    
    * Add list support in check_img_size()
    
    * Add list input support in detect.py
    
    * sys.path.append('./') to run from yolov5/
    
    * Add int8 quantization support for TensorFlow 2.5
    
    * Add get_coco128.sh
    
    * Remove --no-tfl-detect in models/tf.py (Use tf-android-tfl-detect branch for EdgeTPU)
    
    * Update requirements.txt
    
    * Replace torch.load() with attempt_load()
    
    * Update requirements.txt
    
    * Add --tf-raw-resize to set half_pixel_centers=False
    
    * Add --agnostic-nms for TF class-agnostic NMS
    
    * Cleanup after merge
    
    * Cleanup2 after merge
    
    * Cleanup3 after merge
    
    * Add tf.py docstring with credit and usage
    
    * pb saved_model and tflite use only one model in detect.py
    
    * Add use cases in docstring of tf.py
    
    * Remove redundant `stride` definition
    
    * Remove keras direct import
    
    * Fix `check_requirements(('tensorflow>=2.4.1',))`
    
    Co-authored-by: default avatarGlenn Jocher <glenn.jocher@ultralytics.com>
    808bcad3