Fix: Embeddings file ordering
#2
by VoVoR - opened
- images.fbin +1 -1
- main.py +1 -1
images.fbin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 24875016
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6e673d5acf7f4a30f67b91d2cd3fcec73ed9b8891c61c22a3e4cda053ba8c7b6
|
| 3 |
size 24875016
|
main.py
CHANGED
|
@@ -52,7 +52,7 @@ if not exists('images.fbin'):
|
|
| 52 |
model = get_model('unum-cloud/uform-vl-english')
|
| 53 |
vectors = []
|
| 54 |
|
| 55 |
-
for name in tqdm(
|
| 56 |
image = Image.open(join('images', name + '.jpg'))
|
| 57 |
image_data = model.preprocess_image(image)
|
| 58 |
image_embedding = model.encode_image(image_data).detach().numpy()
|
|
|
|
| 52 |
model = get_model('unum-cloud/uform-vl-english')
|
| 53 |
vectors = []
|
| 54 |
|
| 55 |
+
for name in tqdm(list(table["photo_id"]), desc='Vectorizing images'):
|
| 56 |
image = Image.open(join('images', name + '.jpg'))
|
| 57 |
image_data = model.preprocess_image(image)
|
| 58 |
image_embedding = model.encode_image(image_data).detach().numpy()
|