update
This commit is contained in:
@@ -39,7 +39,7 @@ def estimate_idf(paths, kmeans):
|
||||
det = create_detector()
|
||||
K = kmeans.n_clusters
|
||||
df = np.zeros(K, dtype=np.float32)
|
||||
for p in tqdm(paths, desc="Estimating DF/IDF"):
|
||||
for p in tqdm(paths, desc="Estimating TF/IDF"):
|
||||
img = cv2.imread(p, cv2.IMREAD_GRAYSCALE)
|
||||
if img is None: continue
|
||||
kps, d = det.detectAndCompute(img, None)
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<param name="idf" value="$(env HOME)/codebook/idf.npy"/>
|
||||
|
||||
<!-- Detection -->
|
||||
<param name="conf_thres" value="0.25"/>
|
||||
<param name="conf_thres" value="0.5"/>
|
||||
|
||||
<!-- Ngưỡng base cho re-ID (dùng nếu lớp không có ngưỡng riêng) -->
|
||||
<param name="sim_thresh" value="0.12"/>
|
||||
@@ -29,7 +29,7 @@
|
||||
<param name="prototype_maxlen" value="7"/>
|
||||
|
||||
<!-- (3) Ngưỡng theo lớp -->
|
||||
<param name="use_per_class_th" value="true"/>
|
||||
<param name="use_per_class_th" value="false"/>
|
||||
<rosparam param="class_thresholds">
|
||||
cone: 0.12
|
||||
fire_extinguisher: 0.12
|
||||
|
||||
@@ -114,7 +114,7 @@ class Memory:
|
||||
self.vecs = {} # id -> deque of vectors (if USE_PROTOTYPE) or single vec
|
||||
self.proto = {} # id -> current prototype (np.array)
|
||||
self.meta = {} # id -> dict(last_xyz, last_seen, last_box)
|
||||
self.maxlen = maxlen
|
||||
self.maxlen = maxlen
|
||||
self.sim_base = sim_thresh_base
|
||||
|
||||
def _th_for_class(self, cls_name:str)->float:
|
||||
|
||||
Reference in New Issue
Block a user