Dataset Viewer
Auto-converted to Parquet Duplicate
uid
stringlengths
32
32
url
stringlengths
19
10.2k
text
stringlengths
1
10.2k
original_width
int64
14
27.9k
original_height
int64
12
21.6k
clip_l14_similarity_score
float32
-0.08
0.47
sha256
stringlengths
64
64
l14_img
sequencelengths
768
768
l14_txt
sequencelengths
768
768
1bd70b26ce4b7b0ac9978000c15e6c2a
https://www.medanos.com.…5f9d3ed34351.jpg
5.5 ha antes de pueblo edén - nyp37745p
424
450
0.255859
9dfaa0a5dd19d00689abac7600de2b01bed654ea36a6c6b57bd2b028cb870658
[ 0.07476806640625, 0.0169219970703125, 0.04559326171875, -0.06915283203125, -0.05322265625, -0.0267181396484375, 0.013214111328125, -0.007137298583984375, -0.005779266357421875, 0.01800537109375, -0.033782958984375, 0.0202789306640625, 0.03143310546875, 0.01462554931640625, -0.02606201171...
[ -0.0089263916015625, 0.03839111328125, 0.00525665283203125, 0.01531982421875, -0.005096435546875, -0.0263214111328125, 0.031219482421875, 0.0139617919921875, -0.01076507568359375, -0.0285491943359375, 0.00669097900390625, 0.03497314453125, 0.0029163360595703125, 0.005268096923828125, -0....
fe9483317a9f350567ec83dc59ddc3bf
http://www.mappery.com/maps/World-Outline-Map.thumb.jpg
World maps mappery world outline map gumiabroncs
240
160
0.249878
bc59aa48fee895678708dff748fb0d9f59d5a36002af798da126e4c6c5af9067
[ 0.003482818603515625, 0.06304931640625, 0.006378173828125, 0.00585174560546875, -0.0173492431640625, 0.00974273681640625, 0.0159454345703125, -0.01428985595703125, 0.0325927734375, -0.037078857421875, -0.0130767822265625, 0.0041046142578125, -0.0006771087646484375, -0.0023097991943359375, ...
[ -0.0161590576171875, 0.0253753662109375, 0.038116455078125, 0.00015783309936523438, -0.0035305023193359375, 0.0088348388671875, 0.013458251953125, 0.01499176025390625, 0.0092620849609375, 0.055206298828125, -0.040252685546875, -0.00774383544921875, 0.0082244873046875, 0.0117034912109375, ...
fa2cbcb55b0da324be0fc4eb5f8ff0d3
http://as.rdcpix.com/776088671/19fadb255d5df879f17dc1cfb7d9969dp-c0l.jpg
no Photo
300
200
0.126709
c5c678360a1d2ad48bf0f2b7d77684d460bab8bfb6f08936615e80a67e09805f
[ 0.0396728515625, 0.0574951171875, 0.0182342529296875, 0.0079803466796875, 0.0073089599609375, 0.036895751953125, 0.005657196044921875, 0.0115203857421875, -0.0333251953125, -0.0264129638671875, -0.043060302734375, 0.0184478759765625, -0.029541015625, -0.006046295166015625, -0.00067090988...
[ -0.0019626617431640625, 0.048858642578125, 0.03302001953125, -0.035430908203125, -0.00838470458984375, -0.00746917724609375, 0.0284271240234375, -0.00353240966796875, 0.004650115966796875, 0.0175933837890625, -0.050689697265625, -0.011138916015625, 0.005695343017578125, 0.009613037109375, ...
1d3813411775bdc778984d7e7b737e28
https://maps.googleapis.com/maps/api/staticmap?center=45.735979800000000,9.144082799999978&markers=color:red%7C45.735979800000000,9.144082799999978&zoom=13&scale=false&size=533x250&key=AIzaSyCFl3nZpjT8-7uk-7T1gE-GcltQDCJSulY
Via Papa Giovanni Paolo II
533
250
0.196045
d02c84a9a1b3de4ce26d77f52491e3f2f5036e4e85214c899ff292d493c1aa75
[ 0.00397491455078125, 0.0948486328125, 0.018341064453125, -0.051666259765625, -0.03753662109375, -0.07574462890625, 0.01119232177734375, 0.006565093994140625, -0.00033164024353027344, 0.0182647705078125, -0.01898193359375, -0.02313232421875, 0.031463623046875, 0.038116455078125, -0.002895...
[ 0.0292205810546875, -0.00394439697265625, 0.01113128662109375, 0.017669677734375, 0.031036376953125, 0.014556884765625, 0.01421356201171875, -0.006481170654296875, 0.0229339599609375, -0.022125244140625, -0.0025234222412109375, -0.008819580078125, -0.03375244140625, 0.008758544921875, 0....
536781365a4483376b3ca7768d57fdcb
https://hradeczije.cz/wp…ds/2017/01/2.jpg
Stopy na běžky - od hřbitova směr Březina doleva ke Světcům a zpět nebo přes silnici na Březinu a malý okruh kolem potoka.
1,355
904
0.165649
1b80872e028f59bbaf1453846c9e2c400e4c1d20b7e092683dce9ce87af20e97
[ 0.0718994140625, 0.0426025390625, -0.02294921875, -0.04840087890625, 0.0166473388671875, 0.01190948486328125, 0.0095672607421875, 0.01763916015625, 0.03521728515625, -0.01165771484375, -0.034637451171875, 0.0205078125, 0.041534423828125, -0.05035400390625, -0.056671142578125, 0.0164031...
[ -0.01050567626953125, -0.0032558441162109375, -0.0108489990234375, -0.00618743896484375, 0.01387786865234375, 0.01812744140625, -0.0263214111328125, -0.01482391357421875, 0.032928466796875, -0.00482177734375, 0.01245880126953125, 0.0031070709228515625, -0.039154052734375, -0.00624084472656...
fa5c1c9b68e852c640c45e99e83041fd
https://cdn-assets.alltr…39-625x365-1.png
Independence, Ohio Map
625
365
0.214233
fddc56250227a3e9be66c579e22b95587737039313f934a078b8311c5af7e905
[ 0.04388427734375, 0.02978515625, -0.00315093994140625, -0.027679443359375, 0.0016431808471679688, -0.0108184814453125, 0.002197265625, -0.0308990478515625, -0.018707275390625, 0.03240966796875, -0.01404571533203125, 0.01097869873046875, 0.0297698974609375, -0.0416259765625, -0.0037136077...
[ 0.01776123046875, 0.0174407958984375, 0.0099334716796875, 0.0115814208984375, 0.051513671875, 0.0031147003173828125, -0.003551483154296875, 0.0038814544677734375, -0.016021728515625, 0.0195770263671875, 0.04522705078125, 0.0165863037109375, -0.03704833984375, 0.0006661415100097656, -0.08...
c7a8f08bbdd3bb24c55f55613e01d248
https://static.squareyar…ft.jpg?d=751x376
emaar mgf commonwealth games village apartment 4bhk 2626sqft
900
1,136
0.222778
a8bc62d48447996ab401c74830474eeff8ee7a33bd1dba5f40c6d1550322d6f8
[0.037017822265625,0.0638427734375,0.014678955078125,0.0062255859375,0.0086212158203125,0.0350036621(...TRUNCATED)
[-0.060455322265625,0.01483917236328125,-0.03302001953125,0.05462646484375,0.00949859619140625,0.068(...TRUNCATED)
0266b4b314305c9f2469ecda33410782
https://previews.agefoto…a/b19-570455.jpg
Stock Photo: Children.
700
1,050
0.219971
95e672ba5f66b903447f677ff923ff9fb000a98ca3d854ebf9b281dc57a99cda
[-0.0202178955078125,0.00665283203125,0.039031982421875,0.034210205078125,0.0017385482788085938,-0.0(...TRUNCATED)
[-0.04791259765625,0.038299560546875,-0.010101318359375,0.057464599609375,-0.0019664764404296875,-0.(...TRUNCATED)
a3d0537604df1662123eb68aeacff1c7
https://asset.kompas.com…20534fd231a5.jpg
Mengupas Sponge City, Salah Satu Konsep Pembangunan IKN Nusantara
95
95
0.138794
55254a4bc23d5f2b3da163772bc1b5ca72755a86e217e56d94eee0c25e3f3f0f
[0.01299285888671875,-0.0012140274047851562,0.031280517578125,-0.00867462158203125,-0.01576232910156(...TRUNCATED)
[0.009033203125,-0.08447265625,-0.05963134765625,0.015869140625,-0.03240966796875,-0.031951904296875(...TRUNCATED)
f6da2a26288aa9fdb27d30bab651d53b
https://img.weather.goo.…png?202011291453
アメダス
660
495
0.163208
4da502084d233a7c450555284b3d74a1feeea974f583c8d1d97be5ebf2160531
[0.032379150390625,0.09527587890625,0.02484130859375,-0.030059814453125,-0.0186767578125,-0.02145385(...TRUNCATED)
[-0.003536224365234375,-0.01171112060546875,0.02838134765625,0.01145172119140625,0.01251983642578125(...TRUNCATED)
End of preview. Expand in Data Studio

MapPool - Bubbling up an extremely large corpus of maps for AI

many small air bubbles containing colorful maps arising with light rays under the ocean (AI-generated image)

MapPool is a dataset of 75 million potential maps and textual captions. It has been derived from CommonPool, a dataset consisting of 12 billion text-image pairs from the Internet. The images have been encoded by a vision transformer and classified into maps and non-maps by a support vector machine. This approach outperforms previous models and yields a validation accuracy of 98.5%. The MapPool dataset may help to train data-intensive architectures in order to establish vision and language foundation models specialized in maps. The analysis of the dataset and the exploration of the embedding space offers a large potential for future work.

How is the data structured?

Key Meaning
uid Unique identifier
url Link to the image
text Textual description of the image
original_width / original_height Dimensions of the image
sha256 Hash of the image (to verify if the image is the same as the one in the URL)
l14_img Embedding of the image (768 dimensions)
l14_txt Embedding of the textual description (768 dimensions)
clip_l14_similarity_score Similarity between the image and text (higher values indicate higher similarity)

How can this repository be downloaded?

Simply use Git (or TortoiseGit):

git clone https://huggingface.co/datasets/sraimund/MapPool/

Alternatively use the HuggingFace API:

import json
import os
from huggingface_hub import hf_hub_download

download_folder = "<your-download-folder>"
repo_id = "sraimund/MapPool"

# this file is given at the root of this repository
with open("file_list.json") as f:
    file_list = json.load(f)

for part, files in file_list.items():
    for file in files:
        file_path = f"{download_folder}/{part}/{file}.parquet"

        if os.path.exists(file_path):
            continue

        hf_hub_download(repo_type="dataset",
                        repo_id=repo_id,
                        filename=f"{part}/{file}.parquet",
                        local_dir=download_folder,
                        token=read_token)

About 225 GB of space are required. The amount doubles when using Git since the files are duplicated in the .git folder.

How can the parquet files be read?

You can read parquet files with pandas:

import pandas as pd

df = pd.read_parquet("<file_name>.parquet")

The pyarrow or fastparquet library is required additionally.

How can the map images be downloaded?

You can download the map images with img2dataset.

from img2dataset import download

download(
    thread_count=64,
    url_list="<file_name>.parquet",
    output_folder="<folder_path>",
    resize_mode="no",
    output_format="files",
    input_format="parquet",
    url_col="url",
    caption_col="text",
    verify_hash=("sha256", "sha256"),
)

For Windows users:

import multiprocessing as mp
from img2dataset import download

# a small patch is also needed: https://github.com/rom1504/img2dataset/issues/347 
def main():
    download(...)

if __name__ == "__main__":
    multiprocessing.freeze_support()
    main()

As the Internet is constantly changing, about two thirds of the original images (= 48 million) are still downloadable. 6TB of space are required to store them in their original formats and 100GB of space are needed when creating 128x128px thumbnails in the webm format with 60% quality. Downloading the images took 40 hours with 24 CPUs, 30GB RAM, and 40MB/s of network traffic on average.

How was this dataset created?

MapPool has been created by classifying the image embeddings included in CommonPool, which have been generated by two pre-trained vision transformers (ViTs). The L/14 model with more parameters and outputting 768-dimensional embeddings has been considered since it has achieved higher classification accuracies. In this work, different map classifiers (Table 1) from scikit-learn with the Intel Extension have been trained on the embeddings of 1,860 maps and 1,860 non-maps, and have been evaluated on 1,240 maps and 1,240 non-maps (Schnürer et al. 2021). Only simple classification models have been considered due to their efficiency and as meaningful embeddings have already been created by the vision transformer.

Model Accuracy
Xception / InceptionResNetV2 (= Baseline) 96.7
ViT-L/14 + L2 distance to averaged embeddings 96.7
ViT-L/14 + Logistic Regression 97.9
ViT-L/14 + Multilayer Perceptron (3x256 units) 98.2
ViT-L/14 + Support Vector Machine (polynomial, degree 3) 98.5

With the Support Vector Machine, 500,000 image embeddings could be classified within 10 seconds. Downloading, classifying the whole dataset, and uploading the results took about 50 hours with 10 CPUs, 120GB RAM, and 500MB/s of network traffic on average.

Is the inference model available?

Yes, try it out and download it here: https://huggingface.co/spaces/sraimund/MapPool

What are the limitations?

A qualitative inspection of the detected maps looks promising; however, it is not known what the actual accuracy is. Especially the false negative rate is hard to estimate due to the high number of non-maps among the CommonPool images. Mixtures between natural images and maps (e.g., a map printed on a bag, a map in a park) have not been further examined.

Textual embeddings have not been considered in the separation process so far. The training dataset for the map classifier has a large visual variety, such as pictorial maps and 3D maps as well as sketches and paintings. However, the textual descriptions may be too biased since the training dataset originates only from one source.

What are future research directions?

A detailed analysis of the content and metadata of maps in MapPool, potentially resulting in a search engine, is the subject of future work. Additionally, the visual and textual embedding space may be explored to refine the map classifier and to detect duplicates among the images. It can be examined whether training with map-only images leads to better results for cartographic tasks, for instance generating maps based on textual prompts, than with a mixture of maps and other images.

Feel free to contact me in case you like to collaborate!

Disclaimer

The creator is not responsible for the content of linked external websites and will not guarantee for any damage any content of these websites may cause.

License

The dataset is published under the Creative Commons Attribution 4.0 license. Please respect the copyright of the original images when making use of MapPool.

Citation

A short paper is available.

@inproceedings{Schnürer_MapPool_2024, title={MapPool - Bubbling up an extremely large corpus of maps for AI}, author={Schnürer, Raimund}, year={2024}, url={https://infoscience.epfl.ch/handle/20.500.14299/240495}}
Downloads last month
1,791

Data Sourcing report

powered
by Spawning.ai

Some elements in this dataset have been identified as opted-out, or opted-in, by their creator.

Opted-out
Opted-in

Space using sraimund/MapPool 1