ramdrop / autoplace

Implementation for the paper: AutoPlace: Robust Place Recognition with Single-chip Automotive Radar
104 stars 23 forks source link

Question about faiss searching #8

Open whu-lyh opened 8 months ago

whu-lyh commented 8 months ago

Hi @ramdrop , thanks for your amazing works and the release of the code. I find some positions that quite confuse me, and looking forward to your answer.

  1. here, why the number of search is len(dbFeat), in my opinion, the n_values should be used?
    faiss_index = faiss.IndexFlatL2(opt.output_dim)
    faiss_index.add(dbFeat)
    # dists, predictions = faiss_index.search(qFeat, max(n_values))   # the results is sorted
    dists, predictions = faiss_index.search(qFeat, len(dbFeat))
  2. I wonder why the radius dramatically change the PR performance during getting the GT?
    def getPositives(self):
        # positives for evaluation are those within trivial threshold range
        # fit NN to find them, search by radius
        if self.positives is None:
            knn = NearestNeighbors(n_jobs=-1)
            knn.fit(self.dbStruct.utmDb)
            self.distances, self.positives = knn.radius_neighbors(self.dbStruct.utmQ, radius=self.dbStruct.nonTrivPosDistSqThr**0.5) 
        return self.positives
whu-lyh commented 8 months ago

Oops, I figured out the question1.