cat-state commited on
Commit
c929b60
1 Parent(s): ec6a186

add script

Browse files
00000.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c5f5d2787e2cbc78150c0aabee86561f7e4902b654a6410031d10b6e98a0b759
3
+ size 1215099
00000.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d3f4f86fc29ce7ce8d3379266f81f0707a522d731949c086c2119747aaf363df
3
+ size 304599040
00000_stats.json ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "count": 10000,
3
+ "successes": 10000,
4
+ "failed_to_download": 0,
5
+ "failed_to_resize": 0,
6
+ "duration": 161.6459858417511,
7
+ "start_time": 1650478585.1700048,
8
+ "end_time": 1650478746.8159907,
9
+ "status_dict": {
10
+ "success": 10000
11
+ }
12
+ }
00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cd65968ac9a7c0fe365b35f47f27af8b67a9cd1d159fd99df72750e277537622
3
+ size 1214544
00001.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b3dd2a5cfe5e2903b8014a8238a63bc4967c96d6e364856579e6345116a3e77a
3
+ size 304865280
00001_stats.json ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "count": 10000,
3
+ "successes": 10000,
4
+ "failed_to_download": 0,
5
+ "failed_to_resize": 0,
6
+ "duration": 161.53178715705872,
7
+ "start_time": 1650478585.197475,
8
+ "end_time": 1650478746.729262,
9
+ "status_dict": {
10
+ "success": 10000
11
+ }
12
+ }
00002.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3443791e369501c57f53f542ef0d612d0a5fbf251ecae8543f7547a1686431c6
3
+ size 1213535
00002.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d0997a7ffecbd7e1bbbf7e236a1789b40765b5550d5a2cd7dd1201be872ecdb2
3
+ size 305152000
00002_stats.json ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "count": 10000,
3
+ "successes": 10000,
4
+ "failed_to_download": 0,
5
+ "failed_to_resize": 0,
6
+ "duration": 161.83519172668457,
7
+ "start_time": 1650478585.2789,
8
+ "end_time": 1650478747.1140916,
9
+ "status_dict": {
10
+ "success": 10000
11
+ }
12
+ }
00003.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:873deb1462a4883c5ec872a82280df601c6b4c437fe8d86a8696c8c6e040c8e6
3
+ size 1212901
00003.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2d0e84a230dbe16d66be0bc16485ed6c83b988dc29e58e7e4f8b9f47ffc77f08
3
+ size 306810880
00003_stats.json ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "count": 10000,
3
+ "successes": 10000,
4
+ "failed_to_download": 0,
5
+ "failed_to_resize": 0,
6
+ "duration": 161.92681789398193,
7
+ "start_time": 1650478585.396848,
8
+ "end_time": 1650478747.3236659,
9
+ "status_dict": {
10
+ "success": 10000
11
+ }
12
+ }
00004.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d2ce93080276d476c3408ed7693ce72dcec8f47509e155c816c444d1a9c73d9d
3
+ size 1219993
00004.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:da7187e34c5dadf4cde0a4f1ad2baa3b701c9e8878197ab0336ffabdf7353e9f
3
+ size 304209920
00004_stats.json ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "count": 10000,
3
+ "successes": 10000,
4
+ "failed_to_download": 0,
5
+ "failed_to_resize": 0,
6
+ "duration": 160.70949745178223,
7
+ "start_time": 1650478585.407521,
8
+ "end_time": 1650478746.1170185,
9
+ "status_dict": {
10
+ "success": 10000
11
+ }
12
+ }
00005.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f244390a3b4fac256e38f9133ae33b1a9b866dd0b51886fca0dcb6202d1ffaea
3
+ size 1212371
00005.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:77607fc04965dfd0cef94a4dfd16cd32aaf833b530823bde98fd6975507697c8
3
+ size 304035840
00005_stats.json ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "count": 10000,
3
+ "successes": 10000,
4
+ "failed_to_download": 0,
5
+ "failed_to_resize": 0,
6
+ "duration": 161.0035355091095,
7
+ "start_time": 1650478585.4085944,
8
+ "end_time": 1650478746.4121299,
9
+ "status_dict": {
10
+ "success": 10000
11
+ }
12
+ }
00006.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0d494b4e9db4766a4513554f68ab2959730c21181bc2eb2634a1568772324452
3
+ size 1212070
00006.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8caaf41c6f94f7c930a48d916adfc657811565c15041e61c97178905d58b9789
3
+ size 301731840
00006_stats.json ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "count": 10000,
3
+ "successes": 10000,
4
+ "failed_to_download": 0,
5
+ "failed_to_resize": 0,
6
+ "duration": 160.68432569503784,
7
+ "start_time": 1650478585.4339554,
8
+ "end_time": 1650478746.1182811,
9
+ "status_dict": {
10
+ "success": 10000
11
+ }
12
+ }
00007.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b221fe5c07fee3139b0196fc349754c8dd15b925c22469769595044d5136b08f
3
+ size 1209929
00007.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:307a3396812cddf532229f9d76257250c53d11eccdd83c51c5a300c3eefc5cdc
3
+ size 303769600
00007_stats.json ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "count": 10000,
3
+ "successes": 10000,
4
+ "failed_to_download": 0,
5
+ "failed_to_resize": 0,
6
+ "duration": 160.75603890419006,
7
+ "start_time": 1650478585.4690936,
8
+ "end_time": 1650478746.2251325,
9
+ "status_dict": {
10
+ "success": 10000
11
+ }
12
+ }
00008.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f72953eceb2fc258c685c2944bb39fb9d0bbbc26ddb0f3ad178cf7b798ef338e
3
+ size 1215788
00008.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a5bcce777f846f0a8e1025b55f2474a07531dc65d8c576b1d9ef2c945c131a1f
3
+ size 305858560
00008_stats.json ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "count": 10000,
3
+ "successes": 10000,
4
+ "failed_to_download": 0,
5
+ "failed_to_resize": 0,
6
+ "duration": 161.47790718078613,
7
+ "start_time": 1650478585.472853,
8
+ "end_time": 1650478746.9507601,
9
+ "status_dict": {
10
+ "success": 10000
11
+ }
12
+ }
00009.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:67215c5d369faf04ad199f7fe935f80dccbe6032a6bd3c53e16b19c89aa67727
3
+ size 1211019
00009.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7cfbf19baf69a9bc3a3fc18101c237547be7aded64a16f17d32159fae77f6c02
3
+ size 305121280
00009_stats.json ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "count": 10000,
3
+ "successes": 10000,
4
+ "failed_to_download": 0,
5
+ "failed_to_resize": 0,
6
+ "duration": 160.94199967384338,
7
+ "start_time": 1650478585.5302567,
8
+ "end_time": 1650478746.4722564,
9
+ "status_dict": {
10
+ "success": 10000
11
+ }
12
+ }
00010.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:61ba9c81cfe5f755fcb2492e3e2e1f1bbee11d6e4e95c18caa4a148b6625cf50
3
+ size 1210710
00010.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6ece9883ff02f7bf8e51cad9cbbfff4db7a0a95e50f0fbd46d5fc8b2755f0bde
3
+ size 306032640
00010_stats.json ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "count": 10000,
3
+ "successes": 10000,
4
+ "failed_to_download": 0,
5
+ "failed_to_resize": 0,
6
+ "duration": 160.79894018173218,
7
+ "start_time": 1650478585.573142,
8
+ "end_time": 1650478746.3720822,
9
+ "status_dict": {
10
+ "success": 10000
11
+ }
12
+ }
00011.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:858e5dad29dbb98078e6a1596cea4f7faad4746bd8675c571cd48071f401e7ec
3
+ size 1002694
00011.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4b9ec8184f73a18117664b363313375e72677aa4ab50513cfd9f092ce0434bdc
3
+ size 254494720
00011_stats.json ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "count": 8287,
3
+ "successes": 8287,
4
+ "failed_to_download": 0,
5
+ "failed_to_resize": 0,
6
+ "duration": 143.81970477104187,
7
+ "start_time": 1650478585.600615,
8
+ "end_time": 1650478729.4203198,
9
+ "status_dict": {
10
+ "success": 8287
11
+ }
12
+ }
README.md CHANGED
@@ -1,3 +1,5 @@
1
  ---
2
  license: cc-by-4.0
3
  ---
 
 
 
1
  ---
2
  license: cc-by-4.0
3
  ---
4
+
5
+ To reproduce, run `download.sh`
download.sh ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ wget https://huggingface.co/datasets/ChristophSchuhmann/MS_COCO_2017_URL_TEXT/resolve/main/mscoco.parquet
2
+
3
+ python first_caption_only.py
4
+
5
+ img2dataset --url_list mscoco-1st-caption.parquet --input_format "parquet" --url_col "URL" --caption_col "TEXT" --output_format webdataset --output_folder . --processes_count 16 --thread_count 64 --image_size 256
first_caption_only.py ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ import pandas as pd
2
+
3
+ df = pd.read_parquet('mscoco.parquet')
4
+ first_caps = df.drop_duplicates(subset='URL', keep='first')
5
+ first_caps.to_parquet('mscoco-1st-caption.parquet')
requirements.txt ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ img2dataset==1.28.0
2
+ pandas==1.4.1