Add datasets/fake/generate_dataset.py

This commit is contained in:
Benjamin_Loison committed 2024-03-22 10:31:47 +01:00
1 parent 408b7a2ba9
commit 876ce96a58
2 files changed
+23

No files matched your search

+10
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: