If you have run the yolov5 and your dataset is yolo(.txt), this file could help you create a coco-format(.json) file. The only thing you need to do is download the yolo2coco.py and change the text with '#####' in the file to match your dataset.
I used yolo2coco.py to get the json file and have successfully run the repositories like:
nanodet: https://github.com/RangiLyu/nanodet
CenterTrack: https://github.com/xingyizhou/CenterTrack
EfficientDet: https://github.com/zylo117/Yet-Another-EfficientDet-Pytorch