NNNNerd / Triple-I-Net-TINet

Official code for "Illumination-guided RGBT Object Detection with Inter- and Intra-modality Fusion"
Apache License 2.0
16 stars 2 forks source link

Reimplementation results on FLIR dataset #2

Closed zyszxhy closed 10 months ago

zyszxhy commented 10 months ago

Prerequisite

💬 Describe the reimplementation questions

您好,非常感谢您能开源您的工作,但我在复现FLIR数据集的精度时遇到了如下的问题: 1.我使用的是 https://drive.google.com/file/d/1xHDMGl6HJZwtarNWkEV3T4O9X4ZQYz2Y/view 中发布的数据集,按照您在LoadImagePairFromFile类中所写的数据加载方法似乎不能区别白天和黑夜的标签,请问您能提供您的数据集吗? 2.我将faster_rcnn_r50_fpn_tinet_flir.py配置文件中的igfw置为None后进行实验,并尝试增加训练轮次,但无法复现论文Table VII中的结果AP50 93.34%,最终结果仅有75.26%。 如果您能解答我的疑问将不胜感激。

Environment

torch 1.13.1+cu117 mmcv-full 1.7.1 mmdet 2.28.2

Expected results

No response

Additional information

No response

NNNNerd commented 10 months ago

Day-Night Labels

We use the code (running on the Windows system) below to generate day-night labels:

def ill_rename():
    img_files = glob.glob('F:\\data\\FLIR\\FLIR_aligned\\format\\train\\visible\\*.jpeg')
    xml_files = glob.glob('F:\\data\\FLIR\\FLIR_aligned\\format\\train\\annotation\\*.xml')
    day_ids = list(range(0, 70)) + list(range(84, 2245)) + list(range(2367, 3476)) + list(range(3583, 3675)) + \
              list(range(4085, 4129)) + list(range(4225, 4447)) + list(range(4662, 5142))
    night_ids = list(range(70, 84)) + list(range(2245, 2367)) + list(range(3476, 3583)) + list(range(3675, 4085)) + \
                list(range(4129, 4225)) + list(range(4447, 4662))

    for day_id in day_ids:
        # img_file = img_files[day_id]
        # filename = os.path.split(img_file)[-1]
        xml_file = xml_files[day_id]
        filename = os.path.split(xml_file)[-1]
        new_filename = filename[:4]+'0'+filename[4:]
        fname = os.path.splitext(filename)[0]
        # os.rename(img_file, os.path.join('train', 'visible', new_filename))
        # os.rename(os.path.join('train', 'thermal', filename), os.path.join('train', 'thermal', new_filename))
        xml = os.path.join('train', 'annotation', fname+'.xml')
        tree = ET.parse(xml)
        root = tree.getroot()
        filename = root[3]
        filename.text = new_filename
        tree.write(xml)
        os.rename(xml, os.path.join('train', 'annotation', new_filename))

    for night_id in night_ids:
        # img_file = img_files[night_id]
        # filename = os.path.split(img_file)[-1]
        xml_file = xml_files[night_id]
        filename = os.path.split(xml_file)[-1]
        new_filename = filename[:4]+'3'+filename[4:]
        fname = os.path.splitext(filename)[0]
        # os.rename(img_file, os.path.join('train', 'visible', new_filename))
        # os.rename(os.path.join('train', 'thermal', filename), os.path.join('train', 'thermal', new_filename))
        xml = os.path.join('train', 'annotation', fname+'.xml')
        tree = ET.parse(xml)
        root = tree.getroot()
        filename = root[3]
        filename.text = new_filename
        tree.write(xml)
        os.rename(xml, os.path.join('train', 'annotation', new_filename))

Namely, we write '0' into the image filename and annotation filename to annotate 'day', and '3' to annotate 'night'. As for the dataset, we are using the same FLIR-aligned dataset.

Re-implementation results

A multi-level fusion Faster R-CNN baseline can reach 90% mAP50. We suggest that you check the environment and data input. Additionally, we will upload our training logs. Hope this could help.

Environment

mmdet 2.23.0 mmcv-full 1.4.8 pytorch 1.10.0

zyszxhy commented 10 months ago

您好,感谢您的回复。我在阅读了您的数据预处理代码并对比训练日志后有如下的问题: 1.您的数据预处理代码中训练标签有5142个,但官方提供的训练样本仅有4129个,测试样本有1013个。 2.您的训练日志中设置batch size为4,一个epoch中共有1286个iter;我同样设置batch size为4,但一个epoch中只有1033个iter。 请问您是否对官方划分的训练集进行了扩充,是如何扩充的呢? 如果您能解答我的疑问将不胜感激。

NNNNerd commented 10 months ago

Thanks to your notification, we are aware that the training data does not follow the official split of FLIR-aligned in our previous experiments. Testing data is mixed into the training data. We re-conducted ablation studies after we corrected the training data. The results are given in the readme page.