Skip to content

Commit

Permalink
update unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
erdogant committed Dec 29, 2024
1 parent 08cb8ce commit c9c383e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions clustimage/clustimage.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@
import imagehash
from PIL import Image

# import clustimage.exif as exif
import exif as exif
import clustimage.exif as exif
# import exif as exif
import webbrowser

# Support for Apple HEIC images
Expand Down
6 changes: 3 additions & 3 deletions clustimage/tests/test_clustimage.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def test_extract_feat(self):
X = cl.import_example(data='flowers')
X = cl.import_data(X)
_ = cl.extract_feat(X)
assert cl.results['feat'].shape==(X['img'].shape[0], 153)
assert cl.results['feat'].shape==(X['img'].shape[0], 152)

# Init with settings such as PCA
cl = Clustimage(method='hog', verbose=50)
Expand All @@ -61,7 +61,7 @@ def test_embedding(self):
X = cl.import_data(X)
Xfeat = cl.extract_feat(X)
out = cl.embedding(Xfeat)
assert out.shape==(214,2)
assert out.shape==(219,2)
assert cl.results['xycoord'].shape==(X['img'].shape[0], 2)

def test_embedding(self):
Expand All @@ -71,7 +71,7 @@ def test_embedding(self):
X = cl.import_data(X)
Xfeat = cl.extract_feat(X)
xycoord = cl.embedding(Xfeat)
assert xycoord.shape ==(214, 2)
assert xycoord.shape ==(219, 2)
labels = cl.cluster()
assert len(cl.results['labels'])==X['img'].shape[0]

Expand Down

0 comments on commit c9c383e

Please sign in to comment.