https://github.com/dongdonghy/Detection-PyTorch-Notebook/blob/b0c4745150cf019fef2fe661dfe16cc25dd81645/chapter1/model-evaluation/lib/Evaluator.py#L44