Add datasets/fake/generate_dataset.py

This commit is contained in:
2024-03-22 10:31:47 +01:00
parent 408b7a2ba9
commit 876ce96a58
2 changed files with 23 additions and 0 deletions

View File

@@ -1,5 +1,13 @@
import requests
from lxml import html
import os
DOWNLOAD = True
# An alternative for downloading would be something like:
# ```bash
# wget --reject 'index.html*' -l inf -nH --cut-dirs=2 --recursive --no-parent https://lesc.dinfo.unifi.it/VISION/dataset/
# ```
# but this would not only download `flat` images.
url = 'https://lesc.dinfo.unifi.it/VISION/dataset/'
@@ -23,6 +31,8 @@ def getFolderEntries(url):
entries += [[entryName, entrySize]]
return entries
os.mkdir('dataset')
totalPhotoSizes = 0
phoneFolders = getFolderEntries(url)
for phoneFolder, _ in phoneFolders: