VarifocalNet: Question about ablation studies in paper

Hi, thanks for your work and repo. I’m very interested in the VFL, which combines classification scores and location scores in the targets. Then I have some questions about VFL.

  1. In table 3 of the paper, the first row represents the results of the raw VFNet trained with the focal loss. What is raw VFNet? Is it FCOS+ATSS with the centerness branch removed
  2. If not, have you compared the performances between applying VFL to FCOS+ATSS with the centerness branch removed and applying FL to FCOS+ATSS(with the centerness branch)

Thank you very much!

About this issue

  • Original URL
  • State: open
  • Created 4 years ago
  • Comments: 25 (12 by maintainers)

Most upvoted comments

How to merge those per-image results and convert into the format that the evaluation code requires? How to align each per-image results with corresponding gt bboxes? I have successfully reimplement the stage 1-4, but get stacked at stage 5. Could you provide corresponding code of stage 5?

Hi, this is the code for my experiment which was done with mmdetection v1.1. You may write your own based on it. Hope this helps.

import numpy as np
from pycocotools.coco import COCO
import os
import pickle
import torch
import json
import matplotlib.pyplot as plt
import numpy as np

coco_gt_file = './mmdet/data/coco/annotations/instances_val2017.json'
coco = COCO(coco_gt_file)

res_dir = './mmdet/work_dirs/fcos_analysis/fcos_atss_analysis_gt_iou_cls_score/'
img_ids = sorted(coco.getImgIds())
results = []
for img_id in img_ids:
    res_name = os.path.join(res_dir, coco.imgs[img_id]['file_name'][:-4]+'.pt')
    if not os.path.exists(res_name):
        results.append([np.empty((0, 5)) for _ in range(80)])
        continue
    with open(res_name, 'rb') as fp:
        res = pickle.load(fp)
        results.append(res[0])


from mmdet.datasets import build_dataset
import mmcv
config_file = './mmdet/configs/fcos/fcos_analysis_r50_caffe_fpn_gn_1x_4gpu.py'
cfg = mmcv.Config.fromfile(config_file)
cfg.data.test.test_mode = True
dataset = build_dataset(cfg.data.test)
dataset.evaluate(results)