Jelajahi Sumber

cast anchors to list in anchor clustering

will-jl944 4 tahun lalu
induk
melakukan
50021a8f9b
1 mengubah file dengan 2 tambahan dan 1 penghapusan
  1. 2 1
      paddlex/tools/anchor_clustering/yolo_cluster.py

+ 2 - 1
paddlex/tools/anchor_clustering/yolo_cluster.py

@@ -173,5 +173,6 @@ class YOLOAnchorCluster(BaseAnchorCluster):
                 f, centers = new_f, new_centers.copy()
                 f, centers = new_f, new_centers.copy()
                 pbar.desc = 'Evolving anchors with Genetic Algorithm: fitness = %.4f' % f
                 pbar.desc = 'Evolving anchors with Genetic Algorithm: fitness = %.4f' % f
 
 
-        centers = np.round(centers[np.argsort(centers.prod(1))]).astype(int)
+        centers = np.round(centers[np.argsort(centers.prod(1))]).astype(
+            int).tolist()
         return centers
         return centers