Cuogeihong / CEASC

The official implementation of CEASC
Apache License 2.0
99 stars 12 forks source link

关于CEASC在GFL V1基线上结果复现的问题 #20

Open QingfanHou opened 10 months ago

QingfanHou commented 10 months ago

我参考了已经close的几个问题来尝试解决,但是目前为止我根据您的代码对Visdrone数据集进行训练并不能得到和您数据集里相同的结果(准确来说都差好多,并且在我的重复训练中越来越差)。 我直接使用您提供的checkpoint是能获得您论文中的结果的。 下面是我的几个训练日志,希望您能给我提出一些最有可能影响到我训练结果的可能性。 非常感谢您在百忙之中给我提供的帮助。 20231020_155829.log 20231015_203331.log

9a9ab8e0bd04f934fc58178e55c24cc

上图是我能跑出来的最好的结果

jigongbao commented 10 months ago

请问下你第二个日志的27.4是怎么跑出来的?我不管怎么跑都是在24左右?我的复现结果也差很多

QingfanHou commented 10 months ago

请问下你第二个日志的27.4是怎么跑出来的?我不管怎么跑都是在24左右?我的复现结果也差很多

说实话我并没有改变任何的参数。作者的代码我除了更改了数据路径以外其他都没动过。

jigongbao commented 10 months ago

请问下你第二个日志的27.4是怎么跑出来的?我不管怎么跑都是在24左右?我的复现结果也差很多

说实话我并没有改变任何的参数。作者的代码我除了更改了数据路径以外其他都没动过。

不知道会不会是因为我用了更大的batchsize,我试过4,8,12,但这些结果也在24附近。

Cuogeihong commented 10 months ago

你的config应该没问题,而且精度只差了0.8,应该只是setting的问题,可以尝试用两张显卡,每张2的batchsize去跑,和我们的对齐

Cuogeihong commented 10 months ago

请问下你第二个日志的27.4是怎么跑出来的?我不管怎么跑都是在24左右?我的复现结果也差很多

@jigongbao 复现结果差很多应该是环境配错了,可以参考现有issue解决

QingfanHou commented 10 months ago

你的config应该没问题,而且精度只差了0.8,应该只是setting的问题,可以尝试用两张显卡,每张2的batchsize去跑,和我们的对齐

我跑的是您的CEASC模型不是baseline。虽然第一个精度差的不多 但是AP50等后面的就差的有点多了。 很感谢您的回复 我会去尝试一下。感谢您的建议。

jigongbao commented 10 months ago

请问下你第二个日志的27.4是怎么跑出来的?我不管怎么跑都是在24左右?我的复现结果也差很多

@jigongbao 复现结果差很多应该是环境配错了,可以参考现有issue解决

我的环境与您的install 的requirement一致,我参考之前的issue看您的训练日志好像是cuda版本不同,您的是10.2,我用的是11.3,但是因为我使用的是3090无法降至10.2.

QingfanHou commented 10 months ago

@Cuogeihong 我在两张4090上进行了一次训练得到了如下的log。我不大清楚到底发生了什么,你能给我一些指导吗? 20231027_212408.log image

我配置环境的方式如下:

  1. pytorch=1.10.0 cuda 11.3
  2. 使用官网:https://mmcv.readthedocs.io/zh-cn/v1.5.1/get_started/installation.html 中的命令pip install mmcv-full==1.5.1 -f https://download.openmmlab.com/mmcv/dist/cu113/torch1.11.0/index.html 安装mmcv-full 1.5.1版本
  3. 在CEASC主目录下执行 python setup.py install 安装对应版本的mmdet
  4. 根据readme中提供的命令安装需要的库。
  5. 在将config/UAV/dynamic_gfl_res18_visdrone.py中的数据路径更改为本地路径。(上面您提示我两张显卡每张batchsize=2,我将下面被注释掉的auto_scale_lr = dict(base_batch_size=16)改为了auto_scale_lr = dict(base_batch_size=4)并取消了注释。不知道这样改动是否可以达到目的)
  6. 数据的处理流程根据UFPMP-Det 进行处理(我还直接尝试了该作者提供的数据集,在您提供的checkpoint都可以获得您的结果)
QingfanHou commented 10 months ago

@Cuogeihong 在发生上面的情况之后我重现把auto_scale_lr注释掉然后两张gpu进行训练得到了如下的结果 image

107f83e212f537c35760896b21291fa

20231028_124209.log

Cuogeihong commented 10 months ago

coco上27.7的结果应该只是随机数和训练环境的影响,差的很少。但matlab脚本的结果远低于coco上的结果非常奇怪,matlab脚本的结果一般都会高于coco上的,你可以检查一下

QingfanHou commented 10 months ago

@Cuogeihong 我再次进行了测试 下面这两张是您提供的checkpoint跑出来结果

a6c0a2b8f44b3e4a1feea214445c518 dff4d6d55c2ea75a0da34d22eb4e0e4

下面是我的跑出来的结果

9f7d1a6b96ff30f3388bb48124bc181

image 下面是我的checkpoint: https://drive.google.com/file/d/1vIOD4U3S63g_yg8JxMc-KOhCN6NCQZT7/view?usp=sharing

Cuogeihong commented 10 months ago

mmdetection上我提供的checkpoint验证结果是错误的,在我的环境里结果是这样的 image 对齐这个结果后再训练复现应该就不会有问题了。建议直接使用这个仓库的源码去安装,而不是替换mmdetection官方仓库的代码,可能有遗漏

QingfanHou commented 10 months ago

mmdetection上我提供的checkpoint验证结果是错误的,在我的环境里结果是这样的 image 对齐这个结果后再训练复现应该就不会有问题了。建议直接使用这个仓库的源码去安装,而不是替换mmdetection官方仓库的代码,可能有遗漏

出现结果不对齐的原因是因为我使用了UFPMP-Det提供的数据集,在切换成用他的代码处理的数据集之后,我可以在mmdetection上获得和您提供的结果对齐的结果。而后我使用新的数据集重新进行了2gpu去训练 获得了如下结果:

06529eb4f20c5135fe2d35622a590da e02d938ff2517ba329f0317d47d5ed8

我有些束手无策了。

QingfanHou commented 10 months ago

@Cuogeihong 可以给我提供你处理好的数据集吗?

jmjff commented 8 months ago

@QingfanHou 我也遇到了和你类似的问题,在训练的时候得到的python结果和你几乎一样,matlab结果也是很低。我想问一下你解决了吗?

QingfanHou commented 8 months ago

@QingfanHou我也遇到过和你类似的问题,在训练的时候得到的python结果和你几乎一样,matlab结果也解决得很简单。我想问一下你了吗?

还是没能解决。我换成使用querydet的代码了

peiqi999 commented 4 months ago

hi, I didn't find instances_UAVtrain_v1.json in the Visdrone dataset, where should I find it

peiqi999 commented 4 months ago

@QingfanHou hi, I didn't find instances_UAVtrain_v1.json in the Visdrone dataset, where should I find it

QingfanHou commented 4 months ago

@QingfanHou你好,我在Visdrone数据集中没有找到instances_UAVtrain_v1.json,我应该在哪里找到它

This file is available in the COCO format dataset provided by the author at https://github.com/PuAnysh/UFPMP-Det/tree/main, but it lacks 'v1' in its naming. You can manually rename it. However, it seems there might be some issues with the file as provided directly. You can reprocess it using the code provided in the repository mentioned above. It's been a while, so my memory is a bit fuzzy, but I hope this helps you.

peiqi999 commented 3 months ago

@QingfanHou你好,我在Visdrone数据集中没有找到instances_UAVtrain_v1.json,我应该在哪里找到它

This file is available in the COCO format dataset provided by the author at https://github.com/PuAnysh/UFPMP-Det/tree/main, but it lacks 'v1' in its naming. You can manually rename it. However, it seems there might be some issues with the file as provided directly. You can reprocess it using the code provided in the repository mentioned above. It's been a while, so my memory is a bit fuzzy, but I hope this helps you.

谢谢,这对我很有帮助!