Script for conversion to ONNX format is available in tensorrt directory.
python yolo_to_onnx.py -c 80 -m ./yolov4 -o ./yolov4.onnx
The conversion between ONNX and TensorFlow SavedModel is available with the use of onnx (onnx-tensorflow package) command line interface:
onnx-tf convert -i ./yolov4.onnx -o ./yolov4
# convert ONNX to tflite with float32 weights
python tf2tflite.py -m ./yolov4/ -q fp32 -o ./yolov4_fp32.tflite
# convert ONNX to tflite with float16 weights
python tf2tflite.py -m ./yolov4/ -q fp16 -o ./yolov4_fp16.tflite