Coder Social home page Coder Social logo

damo-cv / ada-nets Goto Github PK

View Code? Open in Web Editor NEW
32.0 1.0 3.0 1.03 MB

This is an official implementation for "Ada-NETS: Face Clustering via Adaptive Neighbour Discovery in the Structure Space" accepted at ICLR 2022.

License: MIT License

Python 96.68% Shell 3.32%
face-clustering gcn graph graph-structure-learning

ada-nets's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

ada-nets's Issues

Got result with 0 and nan using MS-1M

Problem Description

Hi, I got some questions with this code. I converted the part0_train and part1_test parts of the MS1M data set into npy files as you described in the readme. The feature files were directly converted into npy files after l2 regularization and label file reading. And I followed the steps suggested by the readme. In the end, I only calculated the pairwise indicator (sim_thres was set to increase from 0.5 to 0.8 in steps of 0.05), but the results kept prompting that ave_pre was 0, ave_rec and fscore were nan. , I would like to ask how to solve this situation?

By the way, when running the faiss_search.sh file, since my GPU is not compatible with faiss-gpu, I used faiss-cpu to solve this problem.

Environment

GPU A100
CUDA 11.0
Python3.6 or Python 3.9
torch 1.7.1+cu110 or torch 1.10.1

使用msmt17_feature_label.zip未达到论文结果 cluster.py中的cos_sim_thres和sim_thres没有给出定义

使用http://idstcv.oss-cn-zhangjiakou.aliyuncs.com/Ada-NETS/MSMT17/msmt17_feature_label.zip给出的数据集跑不出论文中的结果
top改为40的时候bcubed: ave_pre: 0.8325, ave_rec: 0.6552, fscore: 0.7333, cluster_num: 15176
top改为80的时候bcubed: ave_pre: 0.7136, ave_rec: 0.6641, fscore: 0.6879, cluster_num: 14958, singleton_num: 11450
并且cluster.py文件中的cos_sim_thres和sim_thres都没有给出定义
请问应该如何修改

关于论文中没有给出η的值

在论文中的等式2中,定义了新的相似度等于jaccard相似度和cosine相似度的加权和,使用到参数η。但是我在论文中并没有找到实验时这个参数的定义,在代码中发现一个参数lamb=0.3,但是加权的是距离。

所以代码中的lamb=0.3相当于论文中的η=0.7?

有一个不明白的问题?

作者,您好,关于struct space,如果struct_space能改变特征集的整体结构,那就可以直接很好的聚类或者识别了,所以不太明白后续的自适应的意义有多大?

数据集问题

前辈您好:

    首先恭喜您的团队论文高中

}LUG5SI37(_ZHZOKM_5O)BB

   关于您提供的数据集,在上图数字“2”标注处,下载下来的数据,训练集数据是30248,测试集数据是93820,而上图数字“1”标注处,进入“1”的链接后下载的数据(Part1 (584K): GoogleDrive or BaiduYun (passwd: geq5)),训练集数据是576494,测试集数据是584013。
   在上图数字“2”标注处下载的数据上,也就是训练集数据是30248,测试集数据是93820,最终效果达不到您论文所述,和您论文结果相差很大。想请教您一下,您在训练模型和测试模型的时候,训练集和测试集数量分别设置的是多少?

FileNotFoundError: [Errno 2] No such file or directory: 'outpath/ckpt_40000.pth'

Dear author,

when I run>>bash script/train_AND.sh

I get: FileNotFoundError: [Errno 2] No such file or directory: 'outpath/ckpt_40000.pth'

all the other necessary folders are created, but the 'AND/outpath' folder is actually empty. I downloaded the pretrained checkpoints but the mentioned one in the error is not there.
Maybe I miss downloading smtn else?

failed to get the same performance

Thank you for your great work.
I run the train and test scripts on the ms1m dataset these days,but I got poor performance.
Here are my result on ms1m part1_test:
Bcubed fscore:0.6264, parwise fscore 0.4994.
I wonder which step went wrong,could you share the training log?
When I run the train_GCN script ,the last loss is:
loss:1.9265 bclloss_pos:0.007 bclloss_neg:1.919

struct space中相似度的计算代码和论文不一致

论文中相似度的计算是Jaccard距离和cosine相似度的加权和。
image

但是代码实现好像不一样。如果我没搞错的话这部分是在tool/struct_space.py中实现的,如下

sim = 1.0 * len(query_Rstarset & doc_Rstarset) / len(query_Rstarset | doc_Rstarset)
jd = 1 - sim
cd = D[query_nodeid, idx]
nd = (1-lamb) * jd + lamb * cd

其中D是在tool/faiss_search.py中使用faiss计算得到的,但是这里的D是保存的欧式距离?代码如下,这里是使用欧式距离进行索引查找的。而且我打印出来D的值也是由小到大的。

quantizer = faiss.IndexFlatL2(dim)      # 定义量化器/索引为l2距离(欧式距离),越小越好
cpu_index = faiss.IndexIVFFlat(quantizer, dim, nlist)
cpu_index.nprobe = nprobe

请问是这样的吗,还是我有什么遗漏之处?

NameError: name 'knn' is not defined

also, when I run >>bash script/gene_adj.sh I got this:
Traceback (most recent call last):
File "tool/gene_adj_adanets.py", line 3, in
from knn import fast_knns2spmat, knns2ordered_nbrs, fast_knns2spmat_adaptivek
File "/home/nigar/Ada-NETS/tool/knn.py", line 289, in
class knn_brute_force(knn):
NameError: name 'knn' is not defined

关于MSMT17数据集的问题

恭喜您的团队论文高中,请问有公开MSMT17数据集提取后特征的计划吗?我们组也在研究相关工作,十分想follow一下您的工作。祝您生活愉快,工作顺利。

TypeError: in method 'GpuIndexIVFFlat_train', argument 3 of type 'float const *'

I use custom .npy embeddings and labels of my face image dataset. The structure and namings are the same, but when I run >> sh script/faiss_search.sh I get this error : TypeError: in method 'GpuIndexIVFFlat_train', argument 3 of type 'float const *'
. I guess I extracted embeddings differently from the provided by you. Anyway, any help appreciated. I want to cluster a custom dataset

failure.... need help

when executed "pip install -r requirements.txt", Error was shown as below:
ERROR: Could not find a version that satisfies the requirement faiss==1.6.3 (from versions: none)
ERROR: No matching distribution found for faiss==1.6.3
So i noted "#faiss==1.6.3"and"#apex==0.1"(cause for the same issue),the residual requirements parts were installed successfully.
what to deal with the version issue? are there any alternatives version of faiss and apex?
thanks sincerely!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.