diff options
| author | adamhrv <adam@ahprojects.com> | 2018-12-17 01:37:31 +0100 |
|---|---|---|
| committer | adamhrv <adam@ahprojects.com> | 2018-12-17 01:37:31 +0100 |
| commit | 88ec48e1c4d93ba9cd3aa186c068ef2aa4c27c56 (patch) | |
| tree | 506075c0c8f0d4bbf15e97c6db50b6e055c5bd4e /megapixels/commands/cv/cluster.py | |
| parent | 23e9fef5dce8b0b15dd94713816b9d7d45f12356 (diff) | |
fixing dataset procesosrs
Diffstat (limited to 'megapixels/commands/cv/cluster.py')
| -rw-r--r-- | megapixels/commands/cv/cluster.py | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/megapixels/commands/cv/cluster.py b/megapixels/commands/cv/cluster.py index 94334133..419091a0 100644 --- a/megapixels/commands/cv/cluster.py +++ b/megapixels/commands/cv/cluster.py @@ -23,20 +23,20 @@ from app.utils.logger_utils import Logger @click.pass_context def cli(ctx, opt_data_store, opt_dataset, opt_metadata): """Display image info""" - - # cluster the embeddings -print("[INFO] clustering...") -clt = DBSCAN(metric="euclidean", n_jobs=args["jobs"]) -clt.fit(encodings) - -# determine the total number of unique faces found in the dataset -labelIDs = np.unique(clt.labels_) -numUniqueFaces = len(np.where(labelIDs > -1)[0]) -print("[INFO] # unique faces: {}".format(numUniqueFaces)) + + # cluster the embeddings + print("[INFO] clustering...") + clt = DBSCAN(metric="euclidean", n_jobs=args["jobs"]) + clt.fit(encodings) + + # determine the total number of unique faces found in the dataset + labelIDs = np.unique(clt.labels_) + numUniqueFaces = len(np.where(labelIDs > -1)[0]) + print("[INFO] # unique faces: {}".format(numUniqueFaces)) # load and display image im = cv.imread(fp_im) cv.imshow('', im) - + while True: k = cv.waitKey(1) & 0xFF if k == 27 or k == ord('q'): # ESC |
