ashvardanian VoVoR commited on
Commit
6eb2f20
1 Parent(s): d3e828f

Fix: Embeddings file ordering (#2)

Browse files

- Fix: Embeddings file ordering (52e1c648471bdc2493a3fe014da10c7331350beb)


Co-authored-by: Vladimir <[email protected]>

Files changed (2) hide show
  1. images.fbin +1 -1
  2. main.py +1 -1
images.fbin CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:16f635d1f477649283707e704c32dc1d54b7a4e3ae560b6da7c0330bd655ee1e
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(names, 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()
 
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()