Dataset Viewer
Auto-converted to Parquet Duplicate
id
int64
0
7.39k
image
imagewidth (px)
114
3.26k
label_name
stringclasses
37 values
is_dog
bool
2 classes
path
stringlengths
56
81
image_emb
list
0
Siamese
false
/data/datasets/magic-ml/oxford-iiit-pet/images/Siamese_137.jpg
[ 0.000036835670471191406, 0.08734130859375, -0.11602783203125, -0.09124755859375, -0.01519775390625, 0.028594970703125, 0.09478759765625, -0.01837158203125, 0.06805419921875, 0.0171051025390625, 0.0462646484375, -0.0399169921875, -0.026458740234375, -0.052459716796875, -0.0086822509765625...
1
Birman
false
/data/datasets/magic-ml/oxford-iiit-pet/images/Birman_98.jpg
[ 0.0150909423828125, 0.09130859375, -0.119140625, -0.03424072265625, 0.02606201171875, 0.01039886474609375, 0.06768798828125, 0.0157012939453125, 0.0262451171875, 0.01071929931640625, 0.02325439453125, -0.021942138671875, 0.0016489028930664062, -0.044403076171875, 0.05908203125, 0.02833...
2
shiba_inu
true
/data/datasets/magic-ml/oxford-iiit-pet/images/shiba_inu_137.jpg
[ 0.036773681640625, 0.08892822265625, -0.07598876953125, -0.0204620361328125, 0.03375244140625, -0.005115509033203125, -0.024505615234375, -0.036468505859375, 0.0287017822265625, 0.0247344970703125, 0.004970550537109375, -0.0201263427734375, -0.018768310546875, -0.074951171875, 0.00942230...
3
staffordshire_bull_terrier
true
/data/datasets/magic-ml/oxford-iiit-pet/images/staffordshire_bull_terrier_195.jpg
[ 0.00495147705078125, -0.0303497314453125, -0.0361328125, 0.01904296875, -0.005706787109375, 0.060882568359375, 0.01427459716796875, 0.0230712890625, 0.039581298828125, 0.031890869140625, 0.04046630859375, -0.0098724365234375, -0.04510498046875, -0.046478271484375, 0.046478271484375, 0....
4
basset_hound
true
/data/datasets/magic-ml/oxford-iiit-pet/images/basset_hound_78.jpg
[ 0.0265045166015625, 0.0264739990234375, -0.09307861328125, -0.04827880859375, -0.0178375244140625, 0.08282470703125, 0.0029926300048828125, 0.01059722900390625, 0.0228729248046875, 0.037109375, 0.032867431640625, -0.1007080078125, 0.01168060302734375, -0.036865234375, 0.03369140625, 0....
5
Bombay
false
/data/datasets/magic-ml/oxford-iiit-pet/images/Bombay_119.jpg
[ 0.033416748046875, 0.031524658203125, -0.033477783203125, -0.05108642578125, 0.024169921875, 0.03924560546875, 0.049530029296875, -0.026336669921875, 0.04022216796875, -0.018707275390625, 0.0045318603515625, 0.0141754150390625, -0.01107025146484375, -0.0655517578125, 0.045074462890625, ...
6
japanese_chin
true
/data/datasets/magic-ml/oxford-iiit-pet/images/japanese_chin_139.jpg
[ 0.00853729248046875, 0.02215576171875, -0.058502197265625, -0.053253173828125, 0.0273284912109375, 0.0888671875, 0.040863037109375, 0.06298828125, 0.041107177734375, 0.03692626953125, 0.024139404296875, -0.031494140625, -0.031402587890625, -0.0304107666015625, 0.051544189453125, 0.0534...
7
chihuahua
true
/data/datasets/magic-ml/oxford-iiit-pet/images/chihuahua_162.jpg
[ -0.0236053466796875, -0.11871337890625, 0.01336669921875, -0.04278564453125, 0.041351318359375, 0.06964111328125, -0.00815582275390625, 0.0343017578125, 0.0489501953125, 0.0712890625, 0.062347412109375, 0.0071258544921875, -0.0146942138671875, -0.053802490234375, 0.02154541015625, 0.07...
8
german_shorthaired
true
/data/datasets/magic-ml/oxford-iiit-pet/images/german_shorthaired_99.jpg
[ 0.01424407958984375, -0.0038318634033203125, -0.10540771484375, -0.058319091796875, -0.0142669677734375, 0.0677490234375, -0.0293121337890625, 0.01021575927734375, 0.026824951171875, -0.031402587890625, 0.04290771484375, -0.04827880859375, -0.037506103515625, -0.05657958984375, -0.004711...
9
pomeranian
true
/data/datasets/magic-ml/oxford-iiit-pet/images/pomeranian_10.jpg
[ -0.0177154541015625, -0.05279541015625, -0.0875244140625, -0.024993896484375, 0.015228271484375, 0.053314208984375, 0.0133514404296875, 0.0253448486328125, 0.037322998046875, -0.0189666748046875, 0.0020694732666015625, -0.005664825439453125, -0.00403594970703125, -0.022430419921875, 0.04...
10
beagle
true
/data/datasets/magic-ml/oxford-iiit-pet/images/beagle_110.jpg
[ 0.05572509765625, 0.11181640625, -0.09814453125, -0.04681396484375, 0.020233154296875, 0.0701904296875, 0.0179443359375, 0.01073455810546875, -0.003345489501953125, 0.04541015625, 0.055694580078125, -0.02545166015625, -0.0230712890625, -0.04571533203125, 0.037811279296875, 0.0538330078...
11
english_cocker_spaniel
true
/data/datasets/magic-ml/oxford-iiit-pet/images/english_cocker_spaniel_20.jpg
[ -0.0126800537109375, 0.0175933837890625, -0.075927734375, -0.07586669921875, -0.034912109375, 0.06585693359375, 0.00893402099609375, 0.01094818115234375, 0.0194854736328125, 0.08013916015625, 0.0178985595703125, -0.090087890625, -0.030303955078125, 0.013641357421875, 0.003894805908203125...
12
german_shorthaired
true
/data/datasets/magic-ml/oxford-iiit-pet/images/german_shorthaired_48.jpg
[ 0.044921875, 0.05682373046875, -0.02862548828125, -0.11932373046875, -0.01849365234375, 0.036834716796875, -0.013946533203125, 0.02593994140625, 0.011383056640625, 0.0290374755859375, 0.0621337890625, -0.01396942138671875, -0.0296173095703125, -0.1124267578125, 0.01287078857421875, 0.0...
13
american_pit_bull_terrier
true
/data/datasets/magic-ml/oxford-iiit-pet/images/american_pit_bull_terrier_2.jpg
[ 0.0199432373046875, -0.031524658203125, -0.0665283203125, -0.027557373046875, 0.018341064453125, 0.0413818359375, -0.0009751319885253906, -0.00728607177734375, 0.018096923828125, 0.00551605224609375, 0.05419921875, 0.002166748046875, -0.029083251953125, -0.04949951171875, 0.0494079589843...
14
Ragdoll
false
/data/datasets/magic-ml/oxford-iiit-pet/images/Ragdoll_3.jpg
[ 0.0254364013671875, -0.005279541015625, -0.07977294921875, -0.012908935546875, -0.01055908203125, 0.047882080078125, 0.052642822265625, -0.014984130859375, 0.03955078125, 0.0231781005859375, -0.0322265625, 0.024627685546875, -0.00487518310546875, -0.0902099609375, 0.050933837890625, 0....
15
Persian
false
/data/datasets/magic-ml/oxford-iiit-pet/images/Persian_268.jpg
[ 0.009521484375, 0.0036754608154296875, -0.0819091796875, -0.01055145263671875, 0.0243682861328125, 0.029632568359375, 0.0618896484375, -0.01128387451171875, 0.054840087890625, 0.01100921630859375, -0.0247955322265625, 0.020721435546875, 0.001953125, -0.0584716796875, 0.06298828125, 0.0...
16
japanese_chin
true
/data/datasets/magic-ml/oxford-iiit-pet/images/japanese_chin_13.jpg
[ 0.0245513916015625, 0.07965087890625, -0.135986328125, -0.039581298828125, 0.022125244140625, 0.01324462890625, 0.06695556640625, 0.03375244140625, 0.04571533203125, 0.039886474609375, 0.01145172119140625, -0.0264892578125, -0.0391845703125, -0.0018453598022460938, 0.032989501953125, 0...
17
basset_hound
true
/data/datasets/magic-ml/oxford-iiit-pet/images/basset_hound_178.jpg
[ 0.061859130859375, 0.048187255859375, -0.1287841796875, -0.03857421875, -0.01177215576171875, 0.07183837890625, 0.012603759765625, 0.004375457763671875, -0.0263824462890625, -0.0236358642578125, 0.0467529296875, -0.04461669921875, -0.0176849365234375, -0.05633544921875, 0.001885414123535...
18
Egyptian_Mau
false
/data/datasets/magic-ml/oxford-iiit-pet/images/Egyptian_Mau_121.jpg
[ 0.0268096923828125, 0.0171051025390625, -0.0657958984375, -0.06756591796875, -0.0025806427001953125, 0.0670166015625, 0.0408935546875, -0.052490234375, 0.013214111328125, 0.034942626953125, 0.02398681640625, -0.042694091796875, -0.0053863525390625, -0.0556640625, 0.0185546875, 0.017776...
19
staffordshire_bull_terrier
true
/data/datasets/magic-ml/oxford-iiit-pet/images/staffordshire_bull_terrier_144.jpg
[ 0.0290679931640625, 0.0051116943359375, -0.0269622802734375, -0.0338134765625, -0.007175445556640625, 0.0826416015625, -0.00925445556640625, 0.060882568359375, 0.0293426513671875, 0.09246826171875, 0.05828857421875, -0.0273895263671875, -0.0167236328125, -0.0068206787109375, 0.0197448730...
End of preview. Expand in Data Studio

Oxford-IIIT Pet (Lance Format)

Lance-formatted version of the Oxford-IIIT Pet dataset — 7,390 cat & dog photos across 37 breeds — sourced from pcuenq/oxford-pets.

Schema

Column Type Notes
id int64 Row index
image large_binary Inline JPEG bytes
label_name string One of 37 breeds, underscore-spaced (british_shorthair, golden_retriever, …)
is_dog bool true for dog breeds, false for cat breeds
path string? Original filename in the source dataset
image_emb fixed_size_list<float32, 512> OpenCLIP ViT-B-32 embedding (cosine-normalized)

Pre-built indices

  • IVF_PQ on image_embmetric=cosine
  • BITMAP on label_name and is_dog

Quick start

import lance
ds = lance.dataset("hf://datasets/lance-format/oxford-pets-lance/data/train.lance")
print(ds.count_rows(), ds.schema.names, ds.list_indices())

Load with LanceDB

These tables can also be consumed by LanceDB, the multimodal lakehouse and embedded search library built on top of Lance, for simplified vector search and other queries.

import lancedb

db = lancedb.connect("hf://datasets/lance-format/oxford-pets-lance/data")
tbl = db.open_table("train")
print(f"LanceDB table opened with {len(tbl)} images")

Filter — only dogs, only golden retrievers, etc.

import lance
ds = lance.dataset("hf://datasets/lance-format/oxford-pets-lance/data/train.lance")
dogs = ds.scanner(filter="is_dog = true", columns=["label_name"], limit=5).to_table()
goldens = ds.scanner(filter="label_name = 'golden_retriever'", columns=["id"], limit=5).to_table()

Filter with LanceDB

import lancedb

db = lancedb.connect("hf://datasets/lance-format/oxford-pets-lance/data")
tbl = db.open_table("train")
dogs = tbl.search().where("is_dog = true").select(["label_name"]).limit(5).to_list()
goldens = tbl.search().where("label_name = 'golden_retriever'").select(["id"]).limit(5).to_list()

Visual similarity search

import lance, pyarrow as pa
ds = lance.dataset("hf://datasets/lance-format/oxford-pets-lance/data/train.lance")
emb_field = ds.schema.field("image_emb")
ref = ds.take([0], columns=["image_emb", "label_name"]).to_pylist()[0]
neighbors = ds.scanner(
    nearest={"column": "image_emb", "q": pa.array([ref["image_emb"]], type=emb_field.type)[0], "k": 5},
    columns=["id", "label_name"],
).to_table().to_pylist()

LanceDB visual similarity search

import lancedb

db = lancedb.connect("hf://datasets/lance-format/oxford-pets-lance/data")
tbl = db.open_table("train")

ref = tbl.search().limit(1).select(["image_emb", "label_name"]).to_list()[0]
query_embedding = ref["image_emb"]

results = (
    tbl.search(query_embedding)
    .metric("cosine")
    .select(["id", "label_name"])
    .limit(5)
    .to_list()
)

Source & license

Converted from pcuenq/oxford-pets. Released under CC BY-SA 4.0.

Citation

@inproceedings{parkhi2012cats,
  title={Cats and Dogs},
  author={Parkhi, Omkar M. and Vedaldi, Andrea and Zisserman, Andrew and Jawahar, C. V.},
  booktitle={IEEE Conference on Computer Vision and Pattern Recognition (CVPR)},
  year={2012}
}
Downloads last month
52