How to implement mAP metric in PyTorch

Hi,
I need to train my object detection model with Mean Average Precision(mAP) metric.
How can I do it? Is there any source that can help me?
I’m looking forward for your help.

Thank you.