Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

如何训练别的数据集? #2

Open
MXiaoran opened this issue Mar 21, 2024 · 7 comments
Open

如何训练别的数据集? #2

MXiaoran opened this issue Mar 21, 2024 · 7 comments

Comments

@MXiaoran
Copy link

您好,在训练别的数据集时,"{}_unicom.npy"应该如何获取?这是图像特征吗?

@lerogo
Copy link
Owner

lerogo commented Mar 21, 2024

您好,在训练别的数据集时,"{}_unicom.npy"应该如何获取?这是图像特征吗?

你好,"{}_unicom.npy"这个文件,是通过unicom模型获取的图片特征文件,具体请见:https://github.com/deepglint/unicom

关于其数据格式请阅读:
https://github.com/lerogo/aaai24_itr_cusa/blob/main/README.md#data-preprocessing

你也可以读取仓库中的例子文件查看数据格式:
https://github.com/lerogo/aaai24_itr_cusa/tree/main/dataset_example

@MXiaoran
Copy link
Author

您好,感谢您的解答。我已将数据格式转化为类似于[https://github.com/lerogo/aaai24_itr_cusa/tree/main/dataset_example中的数据格式,大致方法是将数据放至 https://github.com/deepglint/unicom/tree/main/data 然后使用unicom的预训练权重执行
https://github.com/deepglint/unicom/tree/main#eval-image-retrieval 这一步吗?感谢!!!

@lerogo
Copy link
Owner

lerogo commented Mar 21, 2024

您好,感谢您的解答。我已将数据格式转化为类似于[https://github.com/lerogo/aaai24_itr_cusa/tree/main/dataset_example中的数据格式,大致方法是将数据放至 https://github.com/deepglint/unicom/tree/main/data 然后使用unicom的预训练权重执行 https://github.com/deepglint/unicom/tree/main#eval-image-retrieval 这一步吗?感谢!!!

应该并不是直接执行它的代码,而是编写代码处理你的数据,请使用它的api:https://github.com/deepglint/unicom?tab=readme-ov-file#api

@MXiaoran
Copy link
Author

您好,再次打扰您了,为什么使用unicom的api处理图片,得到的特征向量维度为768,而您{}_unicom.npy的维度为37672,图1、2、3分别为我处理数据的代码,我得到的维度还有您{}_unicom.npy中的维度为37672
微信图片_20240322164628
2
3

@lerogo
Copy link
Owner

lerogo commented Mar 22, 2024

您好,再次打扰您了,为什么使用unicom的api处理图片,得到的特征向量维度为768,而您{}_unicom.npy的维度为37672,图1、2、3分别为我处理数据的代码,我得到的维度还有您{}_unicom.npy中的维度为37672

请使用 "ViT-B/32"的unicom模型

@MXiaoran
Copy link
Author

您好,我使用"ViT-B/32"的unicom模型得到的特征向量维度只有512

@lerogo
Copy link
Owner

lerogo commented Mar 22, 2024

您好,我使用"ViT-B/32"的unicom模型得到的特征向量维度只有512

不好意思,我重新查看了,我们使用的是forward_features函数。直接用512维的特征或者其他维度的,区别应该不大。因为都只是提供一个外部的相似度而已。

在这个工作的初期,我们使用forward_features得到的特征进行了一些实验,发现它效果不错,所以就一直使用的它。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants