Zi-YuanYang / CO3Net

Code of ”CO3Net: Coordinate-Aware Contrastive Competitive Neural Network for Palmprint Recognition“ (Accepted by IEEE TIM)
20 stars 1 forks source link

请问作者genText.py中的一个问题 #3

Closed Qwenyu closed 4 months ago

Qwenyu commented 4 months ago

在genText.py中有

userID = int(label)
sampleID = userID % 10
userID = int((userID-1)/10)
imagePath = os.path.join(path1, filename)
# if sampleID == ID_number:
ofs.write('%s %d\n'%(imagePath, userID))

以上代码中为什么要将userID/10?

Zi-YuanYang commented 4 months ago

和数据存储的命名有关,这个数据集是每个人有 10 个图片,除 10 是为了拿user id。可以根据你具体数据集的存储方式进行更改,只要你可以拿到 user id即可。

Qwenyu commented 4 months ago

我明白了,谢谢作者!

和数据存储的命名有关,这个数据集是每个人有 10 个图片,除 10 是为了拿user id。可以根据你具体数据集的存储方式进行更改,只要你可以拿到 user id即可。

Qwenyu commented 4 months ago

请问作者一个关于训练的问题。这个模型在训练时模型的收敛速度比较快,为什么默认需要训练3000轮,有什么特殊的原因吗?

Zi-YuanYang commented 4 months ago

CO3Net 主要是在做认证任务,训练的时候输出的分类结果不能完全反应认证的效果。大概到 3k 的时候会有个更好的认证效果。更小的数据集推荐设置成 1k,像多光谱数据集。如果有兴趣,也可以尝试我们的 CCNet,一般经验是CCNet 的收敛速度会更加快一些。

Qwenyu commented 4 months ago

CO3Net 主要是在做认证任务,训练的时候输出的分类结果不能完全反应认证的效果。大概到 3k 的时候会有个更好的认证效果。更小的数据集推荐设置成 1k,像多光谱数据集。如果有兴趣,也可以尝试我们的 CCNet,一般经验是CCNet 的收敛速度会更加快一些。

刚刚入门相关领域知识了解不够充分,感谢作者快速的回答。