Closed kemaloksuz closed 1 year ago
Thanks for your interest. Unfortunately this code does not support dumping detections to json.
You can add some code around the evaluate for loop in https://github.com/jozhang97/DETA/blob/master/engine.py
Something like
for target, output in zip(targets, results):
scores = output['scores'].tolist()
labels = output['labels'].tolist()
boxes = output['boxes']
boxes[:,2:] -= boxes[:,:2] # xyxy xywh
boxes = boxes.tolist()
image_id = target['image_id'].item()
for s, l, b in zip(scores, labels, boxes):
pred = {
'image_id': image_id,
'category_id': l,
'bbox': b,
'score': s
}
ret_json.append(pred)
That was a great help, thanks!
Hi, thanks for the great work.
You mention in the repo that you achieve 63.5 AP on test-dev. I wonder if this repository supports dumping detections to a json file. I spent some time but was not obvious to me.
Thanks