Datasets:
corrupted image records
I'd been thinking about gathering a data set like this -- I was happy to find you'd already done so!
But I did have some problems when I went to load it, UnidentifiedImageError
when it hit certain records.
With a little help I managed to determine that these records, instead of image data, have the HTML of the site's 404 page saved in to either their 1600px
or rawscan
fields.
If I wrote my filter right, maybe there are only four such records, but that's enough to disrupt any map operation!
info_url,1600px_html,rawscan_html
https://www.oldbookillustrations.com/illustrations/corpse/,False,True
https://www.oldbookillustrations.com/illustrations/flowers-y-z/,False,True
https://www.oldbookillustrations.com/illustrations/flowers-e-f-g-h/,False,True
https://www.oldbookillustrations.com/illustrations/anteater/,True,True
I have no idea how to issue a correction for these records. These large parquet archives don't seem to lend themselves to easy patching with the methods I'm familiar with.
I am glad that this dataset is useful to you :)
I still have the images and the script to create the dataset on hf. I checked these images and the images seem to not have been downloaded properly indeed. I will see if I can correct this and upload the whole thing again later this week. Thank you for the info!
The parquet files are automatically created by the datasets library but maybe I will try to find a way to store the files somewhere and link it so it would be more convenient to fix this kind of issues.
The datasets library also supports an ImageFolder format.
I haven't found built-in methods for converting a parquet dataset to an ImageFolder one, but the jsonl is straightforward to write and it seems easier to inspect and maintain for this use case.
Hi,
I found the images for the missing rawscans for the corpse and flowers illustrations, and I am adding them back to the dataset.
For the Anteater illustration, it seems that the url didn't exist, and the page for this illustration was deleted on the old book illustrations website. If you need it anyway, you may find it in the original books, but it's too long for me to search in it. Here is all the info I scrapped about this illustration :
{"infos": {"url": "https://www.oldbookillustrations.com/illustrations/anteater/", "src": "https://www.oldbookillustrations.com/wp-content/uploads/2015/04/anteater-220x220.jpg", "alt": "Giant Anteater"}, "details": {"artist": {"name": "Unknown"}, "illustration": {"source": [{"name": "record", "url": "https://openlibrary.org/books/OL24142868M/Nouveau_dictionnaire_encyclop%C3%A9dique_universel_illustr%C3%A9"}], "subject": "Animals", "format": "Landscape (wider)"}, "book": {"title": "Nouveau dictionnaire encyclop\u00e9dique universel illustr\u00e9", "authors": ["Trousset, Jules (under the direction of)"], "publishers": ["La Librairie Illustr\u00e9e"], "openlibrary-url": "https://openlibrary.org/books/OL24142868M/Nouveau_dictionnaire_encyclop%C3%A9dique_universel_illustr%C3%A9"}, "image": {"title": "Giant Anteater", "caption": "Giant anteater (Myrmecophaga tridactyla).", "rawscan": {"url": "https://www.oldbookillustrations.com/wp-content/high-res/-rawscan.jpg"}, "1600px": {"url": "https://www.oldbookillustrations.com/wp-content/high-res/-1600.jpg"}, "description": "The caption reads in the original French: Grand fourmilier (Myrmecophaga jubata).\n"}, "tags": ["1880s", "19th century", "Americas", "black & white", "mammal", "Myrmecophagidae", "reference book"]}, "json": {"creator": [{"name_1": "Unknown", "birth_date": null, "death_date": null}, {"name_2": null, "dates": null}, {"country_1": null, "country_2": null}], "illustration": [{"tecnhique_1": null, "technique_2": null}, {"engraver_1": null, "engraver_2": null}, {"format": "Landscape (wider)"}, {"caption": "Giant anteater (Myrmecophaga tridactyla)."}, {"description": "Illustration showing a giant anteater, the largest species of anteater. It is found in Central and South America. It is the only species in the Myrmecophaga genus."}, {"image_url": "https://www.oldbookillustrations.com/wp-content/uploads/2015/04/anteater.jpg"}], "book": [{"title": "Nouveau dictionnaire encyclop\u00e9dique universel illustr\u00e9"}, {"author_1": "Trousset, Jules (under the direction of)", "author_2": null, "author_3": null}, {"place_published_1": "Paris", "place_published_2": null, "place_published_3": null}, {"publisher_1": "La Librairie Illustr\u00e9e", "publisher_2": null, "publisher_3": null}, {"date_published": null}], "page_url": "https://www.oldbookillustrations.com/illustrations/anteater/"}},
It seems that the book can be found on BNF's Gallica archive with this query, but consists of multiple volumes.
I am uploading the new version of the dataset with these entries fixed, in parquet format and I am uploading the image files in a images folder. I'll add another branch with a jsonl
format later.
Update: I finished uploading all the images + metadata (as a csv file) on a "files" branch ( https://huggingface.co/datasets/gigant/oldbookillustrations/tree/files/images ).
It took some time because for some reason the git-lfs and huggingface-hub tools didn't allow me to upload all these images at the same time so I launched a loop uploading each image one commit at a time, while respecting the 100 commit per hour limit.