layumi / AICIty-reID-2020

:red_car: The 1st Place Submission to AICity Challenge 2020 re-id track (Baidu-UTS submission)
MIT License
449 stars 110 forks source link

直接测试 #19

Closed HanwenCao closed 4 years ago

HanwenCao commented 4 years ago

作者您好,我是一个新手,我想直接运行测试代码,跳过训练的部分。我尝试运行python fast_submit.py但是发现dataset文件结构不对: No such file or directory: './data/test_data/gallery' 我参照https://github.com/PaddlePaddle/Research/tree/master/CV/PaddleReid/process_aicity_data 完成了数据准备,但是'./data/test_data/gallery'依然没有,请问测试数据集应该怎么准备?感谢

HanwenCao commented 4 years ago

请问@miraclebiu,这是因为数据处理没做好吗?

miraclebiu commented 4 years ago

请问@miraclebiu,这是因为数据处理没做好吗?

对,上面的处理是针对paddle的代码,如果要运行pytorch代码还需要做进一步处理,具体处理方式请阅读readme

HanwenCao commented 4 years ago

请问@miraclebiu,这是因为数据处理没做好吗?

对,上面的处理是针对paddle的代码,如果要运行pytorch代码还需要做进一步处理,具体处理方式请阅读readme

感谢回答!我不太明白这一部分: based on the path you put images, the user should add the path in each line in real_trainval_list.txt or syn_trainval_list.txt(the reason for this operation is that we use coco pretrained detection model to crop images and these images are in another directory) 请问能给一个简单的例子吗?谢谢!

miraclebiu commented 4 years ago

请问@miraclebiu,这是因为数据处理没做好吗?

对,上面的处理是针对paddle的代码,如果要运行pytorch代码还需要做进一步处理,具体处理方式请阅读readme

感谢回答!我不太明白这一部分: based on the path you put images, the user should add the path in each line in real_trainval_list.txt or syn_trainval_list.txt(the reason for this operation is that we use coco pretrained detection model to crop images and these images are in another directory) 请问能给一个简单的例子吗?谢谢!

比如 real的图片放在文件夹A,syn的图片放在文件夹B,crop的图片放在文件夹C,则一个txt内有 A/1.jpg B/2.jpg C/3.jpg 类似于这样的结构

HanwenCao commented 4 years ago

请问@miraclebiu,这是因为数据处理没做好吗?

对,上面的处理是针对paddle的代码,如果要运行pytorch代码还需要做进一步处理,具体处理方式请阅读readme

感谢回答!我不太明白这一部分: based on the path you put images, the user should add the path in each line in real_trainval_list.txt or syn_trainval_list.txt(the reason for this operation is that we use coco pretrained detection model to crop images and these images are in another directory) 请问能给一个简单的例子吗?谢谢!

比如 real的图片放在文件夹A,syn的图片放在文件夹B,crop的图片放在文件夹C,则一个txt内有 A/1.jpg B/2.jpg C/3.jpg 类似于这样的结构

谢谢回复!这里的crop图片是哪里来的?我从https://github.com/PaddlePaddle/Research/tree/master/CV/PaddleReid/process_aicity_data 的步骤1开始的

miraclebiu commented 4 years ago

请问@miraclebiu,这是因为数据处理没做好吗?

对,上面的处理是针对paddle的代码,如果要运行pytorch代码还需要做进一步处理,具体处理方式请阅读readme

感谢回答!我不太明白这一部分: based on the path you put images, the user should add the path in each line in real_trainval_list.txt or syn_trainval_list.txt(the reason for this operation is that we use coco pretrained detection model to crop images and these images are in another directory) 请问能给一个简单的例子吗?谢谢!

比如 real的图片放在文件夹A,syn的图片放在文件夹B,crop的图片放在文件夹C,则一个txt内有 A/1.jpg B/2.jpg C/3.jpg 类似于这样的结构

谢谢回复!这里的crop图片是哪里来的?我从https://github.com/PaddlePaddle/Research/tree/master/CV/PaddleReid/process_aicity_data 的步骤1开始的

使用detectron2中的coco检测模型进行crop

HanwenCao commented 4 years ago

请问@miraclebiu,这是因为数据处理没做好吗?

对,上面的处理是针对paddle的代码,如果要运行pytorch代码还需要做进一步处理,具体处理方式请阅读readme

感谢回答!我不太明白这一部分: based on the path you put images, the user should add the path in each line in real_trainval_list.txt or syn_trainval_list.txt(the reason for this operation is that we use coco pretrained detection model to crop images and these images are in another directory) 请问能给一个简单的例子吗?谢谢!

比如 real的图片放在文件夹A,syn的图片放在文件夹B,crop的图片放在文件夹C,则一个txt内有 A/1.jpg B/2.jpg C/3.jpg 类似于这样的结构

谢谢回复!这里的crop图片是哪里来的?我从https://github.com/PaddlePaddle/Research/tree/master/CV/PaddleReid/process_aicity_data 的步骤1开始的

使用detectron2中的coco检测模型进行crop

谢谢!

Illidan-ai commented 4 years ago

Hello, I am a novice. I want to run the test code directly and skip the training part. I tried to run Python fast_. Submit.py but found that the structure of the dataset file is not correct. 没有这样的文件或目录: I refer toHTTPS://GITHUBCOM/PADELLADADLY/Dealth/Tee/Mask/CV/PADLReReID/PurraseAcExyyx数据 Data preparation is completed, but'./data/test_ Data/gallery'is still not. How do I prepare the test data set? Thank

你好,请问你gallery文件夹制作好了吗,能否和我分享一份呢,这是我的邮箱:1185930616@qq.com 谢谢!

HanwenCao commented 4 years ago

Hello, I am a novice. I want to run the test code directly and skip the training part. I tried to run Python fast_. Submit.py but found that the structure of the dataset file is not correct. 没有这样的文件或目录: I refer toHTTPS://GITHUBCOM/PADELLADADLY/Dealth/Tee/Mask/CV/PADLReReID/PurraseAcExyyx数据 Data preparation is completed, but'./data/test_ Data/gallery'is still not. How do I prepare the test data set? Thank

你好,请问你gallery文件夹制作好了吗,能否和我分享一份呢,这是我的邮箱:1185930616@qq.com 谢谢!

还没明白怎么制作,如果你知道了麻烦也教教我:)

layumi commented 4 years ago

如果是测试test而不是val的话,不需要分文件夹。 直接把测试数据放到对应文件夹下就行,反正我们也没有测试的label。 把官网下载的query放到 ./data/test_data/query/im_query gallery放到 ./data/test_data/gallery/im_test 这种就行。

我一般用 ln -s ./data/im_query ./data/test_data/query/ 类似这种建立一个软连接就行

Illidan-ai commented 4 years ago

感谢您的回复。此外,您用了DGnet来生成更多的不同背景下的车辆,我也用论文里的DGnet训了10万步,但是最多只是换了车辆颜色还达不到换背景的效果,请问您训练DGnet的数据集是如何划分的以及训练参数如何呢?期待您的回复!

琥珀川 1185930616@qq.com

------------------ 原始邮件 ------------------ 发件人: "Zhedong Zheng"<notifications@github.com>; 发送时间: 2020年6月29日(星期一) 晚上9:49 收件人: "layumi/AICIty-reID-2020"<AICIty-reID-2020@noreply.github.com>; 抄送: "琥珀川"<1185930616@qq.com>;"Comment"<comment@noreply.github.com>; 主题: Re: [layumi/AICIty-reID-2020] 直接测试 (#19)

如果是测试test而不是val的话,不需要分文件夹。 直接把测试数据放到对应文件夹下就行,反正我们也没有测试的label。 把官网下载的query放到 ./data/test_data/query/im_query gallery放到 ./data/test_data/gallery/im_test 这种就行。

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

Illidan-ai commented 4 years ago

如果是测试test而不是val的话,不需要分文件夹。直接 把测试数据放到对应文件夹下就行,反正我们也没有测试的标签。 把官网下载的查询放到./data/test_data/query/im_query gallery放到./data/test_data/gallery/im_test 这种就行。

我一般用ln -s ./data/im_query ./data/test_data/query/ 类似这种建立一个软连接就行

由于,您用了DGnet来生成更多的不同背景下的车辆,我也用论文里的DGnet训了10万步,但最多只是换了车辆颜色还达不到换背景的效果,请问您训练DGnet的数据集是如何划分的以及训练参数如何呢?怎么样才能起到替换背景的效果呢?期待您的回复!

layumi commented 4 years ago
  1. 换背景需要用到 MaskRCNN 这是我们3种生成方式中的另一种。
  2. DG-Net主要是换车的appearance, 比如黑车变红车。我们当时训练完,选择了一些能明显变化的appearance的车,作为新的ID加入训练。 当时比赛比较急,也只是一部分模型用了这个训练集。
Illidan-ai commented 4 years ago

您好,按照您说的

“把官网下载的query放到 ./data/test_data/query/im_query gallery放到 ./data/test_data/gallery/im_test”

然后运行test_2020.py,得到的结果Rank1-10和mAP都为0,这样直接把图片放在路径下合适吗?

琥珀川 1185930616@qq.com

------------------ 原始邮件 ------------------ 发件人: "Zhedong Zheng"<notifications@github.com>; 发送时间: 2020年6月29日(星期一) 晚上9:49 收件人: "layumi/AICIty-reID-2020"<AICIty-reID-2020@noreply.github.com>; 抄送: "琥珀川"<1185930616@qq.com>;"Comment"<comment@noreply.github.com>; 主题: Re: [layumi/AICIty-reID-2020] 直接测试 (#19)

如果是测试test而不是val的话,不需要分文件夹。 直接把测试数据放到对应文件夹下就行,反正我们也没有测试的label。 把官网下载的query放到 ./data/test_data/query/im_query gallery放到 ./data/test_data/gallery/im_test 这种就行。

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

Paulamde commented 4 years ago

Hello, If we want to directly test the result and replicate the mAP that your code obtains in the challenge (0.84), Is it necessary the image alignment of the gallery and query images applying the detectron2 to obtain the crop images? This crop images used are directly the output of the detectron2? thanks!!

layumi commented 4 years ago

@Paulamde Yes. The cropped image could improve the result slightly. Yes. It is from the output of detectron2.

layumi commented 4 years ago

@Illidan-ai For validation, you need to run test_2020.py, using the validation set we split. For testing, you need to upload the result to the offical net. You need to use the submit.py to extract feature of image_query and image_test.

vokhidovhusan commented 3 years ago

@layumi First of all thank you for your great job.

For running test_2020.py I am using validation data for gallery but what should I use for query data?

Thank you