Are you sure you want to delete this access key?
Legend |
---|
DVC Managed File |
Git Managed File |
Metric |
Stage File |
External File |
Legend |
---|
DVC Managed File |
Git Managed File |
Metric |
Stage File |
External File |
LAION-Aesthetics is a subset of the LAION 5B dataset with high visual quality.
The dataset in this repo is specifically the images that scored 6.5 or higher via aesthetics prediction models. These models were trained to predict the rating people gave when asked “How much do you like this image on a scale from 1 to 10?”.
The data is composed of image-caption pairs along with an aesthetics score for each image and the original URL, from which it was downloaded.
All of the images can be found under the data/ folder.
A TSV-formatted labels file can also be found there (data/labels.tsv.
This TSV file contains 4 columns: image file name, caption, aesthetics score, url
import os
from dagshub.streaming import DagsHubFilesystem
from PIL import Image
# Setup data streaming from DagsHub
fs = DagsHubFilesystem('.', repo_url='https://dagshub.com/DagsHub-Datasets/LAION-Aesthetics-V2-6.5plus')
fs.install_hooks()
# Get all images + labels.tsv file
files = fs.listdir('data/')
# Get the data for the first 5 images in the labels.tsv file
with fs.open('data/labels.tsv') as tsv:
for row in tsv.readlines()[:5]:
row = row.strip()
img_file, caption, score, url = row.split('\t')
# Load the image file
img_path = os.path.join('data', img_file)
img = Image.open(img_path)
print(f'{img_file} has a size of {img.size} and an aesthetics score of {score}')
For further information, see the LAION-Aesthetics project page. This dataset was created by LAION.
Press p or to see the previous file or, n or to see the next file
Are you sure you want to delete this access key?
Are you sure you want to delete this access key?
Are you sure you want to delete this access key?
Are you sure you want to delete this access key?