ayushexel commited on
Commit
fe82083
·
verified ·
1 Parent(s): 8e41099

Add files using upload-large-folder tool

Browse files
.gitattributes CHANGED
@@ -58,3 +58,5 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
58
  # Video files - compressed
59
  *.mp4 filter=lfs diff=lfs merge=lfs -text
60
  *.webm filter=lfs diff=lfs merge=lfs -text
 
 
 
58
  # Video files - compressed
59
  *.mp4 filter=lfs diff=lfs merge=lfs -text
60
  *.webm filter=lfs diff=lfs merge=lfs -text
61
+ data/train.lance/_indices/5e6cb445-cf6f-450d-b8a8-0c8ceb1d8e4d/auxiliary.idx filter=lfs diff=lfs merge=lfs -text
62
+ data/train.lance/data/10000101011101100100001155503d4baebc977b5d2f773ddb.lance filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,81 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: cc-by-sa-4.0
3
+ task_categories:
4
+ - image-classification
5
+ - image-feature-extraction
6
+ language:
7
+ - en
8
+ tags:
9
+ - oxford-pets
10
+ - fine-grained
11
+ - pets
12
+ - lance
13
+ - clip-embeddings
14
+ pretty_name: oxford-pets-lance
15
+ size_categories:
16
+ - 1K<n<10K
17
+ ---
18
+ # Oxford-IIIT Pet (Lance Format)
19
+
20
+ Lance-formatted version of the [Oxford-IIIT Pet dataset](https://www.robots.ox.ac.uk/~vgg/data/pets/) — 7,390 cat & dog photos across 37 breeds — sourced from [`pcuenq/oxford-pets`](https://huggingface.co/datasets/pcuenq/oxford-pets).
21
+
22
+ ## Schema
23
+
24
+ | Column | Type | Notes |
25
+ |---|---|---|
26
+ | `id` | `int64` | Row index |
27
+ | `image` | `large_binary` | Inline JPEG bytes |
28
+ | `label_name` | `string` | One of 37 breeds, underscore-spaced (`british_shorthair`, `golden_retriever`, …) |
29
+ | `is_dog` | `bool` | `true` for dog breeds, `false` for cat breeds |
30
+ | `path` | `string?` | Original filename in the source dataset |
31
+ | `image_emb` | `fixed_size_list<float32, 512>` | OpenCLIP `ViT-B-32` embedding (cosine-normalized) |
32
+
33
+ ## Pre-built indices
34
+
35
+ - `IVF_PQ` on `image_emb` — `metric=cosine`
36
+ - `BITMAP` on `label_name` and `is_dog`
37
+
38
+ ## Quick start
39
+
40
+ ```python
41
+ import lance
42
+ ds = lance.dataset("hf://datasets/lance-format/oxford-pets-lance/data/train.lance")
43
+ print(ds.count_rows(), ds.schema.names, ds.list_indices())
44
+ ```
45
+
46
+ ## Filter — only dogs, only golden retrievers, etc.
47
+
48
+ ```python
49
+ import lance
50
+ ds = lance.dataset("hf://datasets/lance-format/oxford-pets-lance/data/train.lance")
51
+ dogs = ds.scanner(filter="is_dog = true", columns=["label_name"], limit=5).to_table()
52
+ goldens = ds.scanner(filter="label_name = 'golden_retriever'", columns=["id"], limit=5).to_table()
53
+ ```
54
+
55
+ ## Visual similarity search
56
+
57
+ ```python
58
+ import lance, pyarrow as pa
59
+ ds = lance.dataset("hf://datasets/lance-format/oxford-pets-lance/data/train.lance")
60
+ emb_field = ds.schema.field("image_emb")
61
+ ref = ds.take([0], columns=["image_emb", "label_name"]).to_pylist()[0]
62
+ neighbors = ds.scanner(
63
+ nearest={"column": "image_emb", "q": pa.array([ref["image_emb"]], type=emb_field.type)[0], "k": 5},
64
+ columns=["id", "label_name"],
65
+ ).to_table().to_pylist()
66
+ ```
67
+
68
+ ## Source & license
69
+
70
+ Converted from [`pcuenq/oxford-pets`](https://huggingface.co/datasets/pcuenq/oxford-pets). Released under [CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/).
71
+
72
+ ## Citation
73
+
74
+ ```
75
+ @inproceedings{parkhi2012cats,
76
+ title={Cats and Dogs},
77
+ author={Parkhi, Omkar M. and Vedaldi, Andrea and Zisserman, Andrew and Jawahar, C. V.},
78
+ booktitle={IEEE Conference on Computer Vision and Pattern Recognition (CVPR)},
79
+ year={2012}
80
+ }
81
+ ```
data/train.lance/_indices/5e6cb445-cf6f-450d-b8a8-0c8ceb1d8e4d/auxiliary.idx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2cf1a810bb16ffdab700ab6e3f9f38aff8b82dafb41dc3f286228fc9c1305aa0
3
+ size 1012804
data/train.lance/_indices/5e6cb445-cf6f-450d-b8a8-0c8ceb1d8e4d/index.idx ADDED
Binary file (33.1 kB). View file
 
data/train.lance/_indices/737ec6fd-d13f-4bc0-a5b5-94fdd6b8b316/bitmap_page_lookup.lance ADDED
Binary file (13.7 kB). View file
 
data/train.lance/_indices/f638bab1-bc20-4c91-8b67-da71943d4bd2/bitmap_page_lookup.lance ADDED
Binary file (17.3 kB). View file
 
data/train.lance/_transactions/0-54a71fbd-bc4a-4619-b085-bcfc7dc72a6a.txn ADDED
Binary file (353 Bytes). View file
 
data/train.lance/_transactions/1-49933297-0e80-457b-87ba-ee06e4e647e8.txn ADDED
Binary file (189 Bytes). View file
 
data/train.lance/_transactions/2-d002b531-3d74-4139-bf9c-13b74bd45dbe.txn ADDED
Binary file (184 Bytes). View file
 
data/train.lance/_transactions/3-21aecbf9-053a-4e3c-b40c-c23538ee26b7.txn ADDED
Binary file (179 Bytes). View file
 
data/train.lance/_versions/18446744073709551611.manifest ADDED
Binary file (1.04 kB). View file
 
data/train.lance/_versions/18446744073709551612.manifest ADDED
Binary file (914 Bytes). View file
 
data/train.lance/_versions/18446744073709551613.manifest ADDED
Binary file (779 Bytes). View file
 
data/train.lance/_versions/18446744073709551614.manifest ADDED
Binary file (790 Bytes). View file
 
data/train.lance/data/10000101011101100100001155503d4baebc977b5d2f773ddb.lance ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1b35f46155cd71fa6a5c336aa83ec2ccef983ae6ada77236cb3dc9ef29b2b602
3
+ size 350299756