Update README.md
Browse files
README.md
CHANGED
@@ -1,3 +1,148 @@
|
|
1 |
-
---
|
2 |
-
license: cc0-1.0
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: cc0-1.0
|
3 |
+
language:
|
4 |
+
- en
|
5 |
+
pretty_name: The Metropolitan Museum of Art - Open Access CSV
|
6 |
+
dataset_info:
|
7 |
+
features:
|
8 |
+
- name: Object Number
|
9 |
+
dtype: string
|
10 |
+
- name: Is Highlight
|
11 |
+
dtype: bool
|
12 |
+
- name: Is Timeline Work
|
13 |
+
dtype: bool
|
14 |
+
- name: Is Public Domain
|
15 |
+
dtype: bool
|
16 |
+
- name: Object ID
|
17 |
+
dtype: int32
|
18 |
+
- name: Gallery Number
|
19 |
+
dtype: string
|
20 |
+
- name: Department
|
21 |
+
dtype: string
|
22 |
+
- name: AccessionYear
|
23 |
+
dtype: float64
|
24 |
+
- name: Object Name
|
25 |
+
dtype: string
|
26 |
+
- name: Title
|
27 |
+
dtype: string
|
28 |
+
- name: Culture
|
29 |
+
dtype: string
|
30 |
+
- name: Period
|
31 |
+
dtype: string
|
32 |
+
- name: Dynasty
|
33 |
+
dtype: string
|
34 |
+
- name: Reign
|
35 |
+
dtype: string
|
36 |
+
- name: Portfolio
|
37 |
+
dtype: string
|
38 |
+
- name: Constituent ID
|
39 |
+
dtype: string
|
40 |
+
- name: Artist Role
|
41 |
+
dtype: string
|
42 |
+
- name: Artist Prefix
|
43 |
+
dtype: string
|
44 |
+
- name: Artist Display Name
|
45 |
+
dtype: string
|
46 |
+
- name: Artist Display Bio
|
47 |
+
dtype: string
|
48 |
+
- name: Artist Suffix
|
49 |
+
dtype: string
|
50 |
+
- name: Artist Alpha Sort
|
51 |
+
dtype: string
|
52 |
+
- name: Artist Nationality
|
53 |
+
dtype: string
|
54 |
+
- name: Artist Begin Date
|
55 |
+
dtype: string
|
56 |
+
- name: Artist End Date
|
57 |
+
dtype: string
|
58 |
+
- name: Artist Gender
|
59 |
+
dtype: string
|
60 |
+
- name: Artist ULAN URL
|
61 |
+
dtype: string
|
62 |
+
- name: Artist Wikidata URL
|
63 |
+
dtype: string
|
64 |
+
- name: Object Date
|
65 |
+
dtype: string
|
66 |
+
- name: Object Begin Date
|
67 |
+
dtype: int64
|
68 |
+
- name: Object End Date
|
69 |
+
dtype: int64
|
70 |
+
- name: Medium
|
71 |
+
dtype: string
|
72 |
+
- name: Dimensions
|
73 |
+
dtype: string
|
74 |
+
- name: Credit Line
|
75 |
+
dtype: string
|
76 |
+
- name: Geography Type
|
77 |
+
dtype: string
|
78 |
+
- name: City
|
79 |
+
dtype: string
|
80 |
+
- name: State
|
81 |
+
dtype: string
|
82 |
+
- name: County
|
83 |
+
dtype: string
|
84 |
+
- name: Country
|
85 |
+
dtype: string
|
86 |
+
- name: Region
|
87 |
+
dtype: string
|
88 |
+
- name: Subregion
|
89 |
+
dtype: string
|
90 |
+
- name: Locale
|
91 |
+
dtype: string
|
92 |
+
- name: Locus
|
93 |
+
dtype: string
|
94 |
+
- name: Excavation
|
95 |
+
dtype: string
|
96 |
+
- name: River
|
97 |
+
dtype: string
|
98 |
+
- name: Classification
|
99 |
+
dtype: string
|
100 |
+
- name: Rights and Reproduction
|
101 |
+
dtype: string
|
102 |
+
- name: Link Resource
|
103 |
+
dtype: string
|
104 |
+
- name: Object Wikidata URL
|
105 |
+
dtype: string
|
106 |
+
- name: Metadata Date
|
107 |
+
dtype: string
|
108 |
+
- name: Repository
|
109 |
+
dtype: string
|
110 |
+
- name: Tags
|
111 |
+
dtype: string
|
112 |
+
- name: Tags AAT URL
|
113 |
+
dtype: string
|
114 |
+
- name: Tags Wikidata URL
|
115 |
+
dtype: string
|
116 |
+
---
|
117 |
+
The Metropolitan Museum of Art Open Access on HuggingFace
|
118 |
+
===================
|
119 |
+
|
120 |
+
The [Metropolitan Museum of Art](http://www.metmuseum.org) presents over 5,000 years of art from around the world for everyone to experience and enjoy. The Museum lives in two iconic sites in New York City-The Met Fifth Avenue and The Met Cloisters. Millions of people also take part in The Met experience online.
|
121 |
+
|
122 |
+
Since it was founded in 1870, The Met has always aspired to be more than a treasury of rare and beautiful objects. Every day, art comes alive in the Museum's galleries and through its exhibitions and events, revealing both new ideas and unexpected connections across time and across cultures.
|
123 |
+
|
124 |
+
The Metropolitan Museum of Art provides select datasets of information on more than 470,000 artworks in its Collection for unrestricted commercial and noncommercial use. To the extent possible under law, The Metropolitan Museum of Art has waived all copyright and related or neighboring rights to this dataset using [Creative Commons Zero](https://creativecommons.org/publicdomain/zero/1.0/). This work is published from: The United States Of America. You can also find the text of the CC Zero deed in the file [LICENSE](https://github.com/metmuseum/openaccess/blob/master/LICENSE) in this repository. These select datasets are now available for use in any media without permission or fee; they also include identifying data for artworks under copyright. The datasets support the search, use, and interaction with the Museum's collection.
|
125 |
+
|
126 |
+
## Additional usage guidelines
|
127 |
+
For more details on how to use images of artworks in The Metropolitan Museum of Art’s collection, please visit our [Open Access](http://www.metmuseum.org/about-the-met/policies-and-documents/image-resources) page.
|
128 |
+
|
129 |
+
## Updating or recreating the CSV + images
|
130 |
+
Right now, this is a manual process. Working on it!
|
131 |
+
1. Download or clone the CSV from our [github](https://github.com/metmuseum/openaccess)
|
132 |
+
2. (Optional) Create a compressed CSV
|
133 |
+
* Since some operating systems or machines choke on our huge CSV, it can be convenient to compress the file.
|
134 |
+
* Easiest: ```gzip MetObjects.csv```
|
135 |
+
3. Process the CSV
|
136 |
+
* Right now, there are many ```\n``` characters in the CSV. Some Python interpreters don't like this.
|
137 |
+
* Use ```clean.py``` to create a cleaned version, now called ```metadata.csv.gz```
|
138 |
+
4. (Optional) add images to the CSV
|
139 |
+
* Run ```add_images.py```
|
140 |
+
* It will take a while
|
141 |
+
* CAUTION: be very careful with the ```do_verify``` variable. Some networks do SSL redirects that Python does not like. Disabling this will not verify SSL certs. This is a quick band-aid to bypass this, but totally unsafe.
|
142 |
+
5. Install [img2dataset](https://github.com/rom1504/img2dataset)
|
143 |
+
* ```pip install img2dataset```
|
144 |
+
6. Run ```img2dataset``` with the following options:
|
145 |
+
* ```img2dataset --processes_count 10 --thread_count 64 --url_list "cleaned_metadata_images.csv.gz" --input_format "csv.gz" --output_format "webdataset" --output_folder "data" --url_col "primaryImageSmall" --disable_all_reencoding "True" --max_shard_retry 10 --retries 10 --save_additional_columns "['Is Highlight', 'Is Timeline Work', 'Is Public Domain', 'Object ID', 'Gallery Number', 'Department', 'AccessionYear', 'Object Name', 'Title', 'Culture', 'Period', 'Dynasty', 'Reign', 'Portfolio', 'Constituent ID', 'Artist Role', 'Artist Prefix', 'Artist Display Name', 'Artist Display Bio', 'Artist Suffix', 'Artist Alpha Sort', 'Artist Nationality', 'Artist Begin Date', 'Artist End Date', 'Artist Gender', 'Artist ULAN URL', 'Artist Wikidata URL', 'Object Date', 'Object Begin Date', 'Object End Date', 'Medium', 'Dimensions', 'Credit Line', 'Geography Type', 'City', 'State', 'County', 'Country', 'Region', 'Subregion', 'Locale', 'Locus', 'Excavation', 'River', 'Classification', 'Rights and Reproduction', 'Link Resource', 'Object Wikidata URL', 'Metadata Date', 'Repository', 'Tags', 'Tags AAT URL', 'Tags Wikidata URL']"```
|
146 |
+
* See img2dataset's docs for details on the above. You may want to remove the ```disable_all_reencoding``` option... As-is, it does not downsize or compress images at all
|
147 |
+
* This will take some time
|
148 |
+
7. Voila! You should have a large data folder with many json, tar, and parquet files. You should be able to load this in the huggingface client library as a dataset, etc.
|