This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
from pathlib import Path | |
import glob | |
import os | |
import shutil | |
from tqdm import tqdm | |
import numpy as np |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" only part codes """ | |
# read groundtruth and predictions | |
dataDir= Path('datasets/coco') | |
valImageRoot = dataDir / 'val2017' | |
groudtruth_path = dataDir / 'annotations/instances_val2017.json' | |
prediction_path = 'output/inference/coco_instances_results.json' | |
cocoGt=COCO(groudtruth_path) | |
cocoDt = cocoGt.loadRes(prediction_path) |
NewerOlder