From 7bae0953846b509e08f851675040d35b56c26e6f Mon Sep 17 00:00:00 2001 From: osmarks Date: Mon, 22 Apr 2024 13:54:07 +0100 Subject: [PATCH] accidentally lost some manual labels, oops, etc --- meme-rater/extract_test_set.py | 22 ++++++++++++++++++++++ meme-rater/test_set.json | 1 + 2 files changed, 23 insertions(+) create mode 100644 meme-rater/extract_test_set.py create mode 100644 meme-rater/test_set.json diff --git a/meme-rater/extract_test_set.py b/meme-rater/extract_test_set.py new file mode 100644 index 0000000..558c504 --- /dev/null +++ b/meme-rater/extract_test_set.py @@ -0,0 +1,22 @@ +# oops + +import re +import json + +with open("eval.html", "r") as f: + html = f.read() + mats = re.findall(r"""
""", html) + +data = json.loads("[[1.2792096138000488,true],[1.1153279542922974,true],[0.9720794558525085,true],[-0.5180545449256897,false],[1.4547114372253418,true],[1.3289614915847778,true],[1.8748269081115723,true],[0.05465051531791687,false],[0.7888763546943665,true],[1.368210792541504,true],[1.4808461666107178,true],[0.9501181244850159,true],[1.2592355012893677,true],[1.0127032995224,true],[-0.8805797100067139,false],[-0.08946493268013,true],[0.4224545955657959,false],[1.0051900148391724,true],[0.5121232271194458,false],[1.0876282453536987,false],[1.5552432537078857,true],[-0.3680466413497925,false],[0.45498305559158325,true],[1.3851803541183472,true],[-0.8842921853065491,false],[2.6869430541992188,false],[1.6892706155776978,false],[0.7087478637695312,false],[-0.5138207077980042,false],[0.16498255729675293,false],[1.265992283821106,true],[0.47311416268348694,false],[0.04918492212891579,false],[1.283980369567871,true],[1.0510015487670898,false],[1.6323922872543335,false],[0.4570896625518799,true],[1.5262614488601685,true],[1.4057230949401855,true],[1.0391144752502441,true],[0.9190238118171692,true],[1.2970502376556396,true],[2.025949478149414,true],[0.6396026611328125,true],[2.3505871295928955,true],[1.0854156017303467,false],[1.0216373205184937,true],[-1.163207769393921,false],[1.8854788541793823,true],[0.249663308262825,false],[-0.8619526028633118,false],[1.9995672702789307,true],[1.0939114093780518,false],[0.6106101870536804,false],[1.8383781909942627,false],[-0.0637127161026001,false],[-0.34953051805496216,false],[0.988452672958374,false],[0.5209289193153381,false],[-0.4708566963672638,false],[0.4715256690979004,false],[-0.7905446887016296,false],[2.0255637168884277,true],[0.8488644361495972,false],[1.6645262241363525,true],[1.0948383808135986,true],[-0.8315924406051636,false],[1.5533114671707153,true],[0.9333463907241821,true],[-0.5723654627799988,false],[1.9510998725891113,true],[0.2842162549495697,false],[1.1901239156723022,false],[1.5058742761611938,false],[0.7622374296188354,false],[0.2894713282585144,false],[0.0965774804353714,false],[0.6335093379020691,false],[-0.7369110584259033,false],[1.2673722505569458,true],[0.9775630235671997,false],[0.7889275550842285,false],[-0.9432369470596313,false],[0.24122865498065948,false],[1.075297474861145,false],[0.545269250869751,false],[-0.1398508995771408,false],[-0.31118375062942505,false],[1.47971510887146,false],[0.5115379691123962,true],[0.8894630074501038,true],[0.4365079700946808,true],[2.5944597721099854,true],[0.8613907694816589,false],[1.1540073156356812,false],[1.6798168420791626,true],[1.5266021490097046,true],[0.2556634545326233,false],[0.90388423204422,false],[0.36393579840660095,false],[1.297504186630249,true],[1.091887354850769,true],[0.931088924407959,true],[0.8854649066925049,true],[0.0385725162923336,false],[1.5259686708450317,true],[-0.725635826587677,false],[-1.72086501121521,false],[1.9044498205184937,true],[-0.10369344800710678,false],[-0.5889104604721069,true],[0.2478746473789215,false],[1.4628609418869019,false],[1.1434470415115356,false],[0.20635242760181427,false],[0.8324120044708252,false],[0.676543653011322,false],[1.1111537218093872,true],[0.0488731786608696,false],[0.8705015182495117,true],[0.5464357733726501,true],[0.6190940737724304,true],[0.33756133913993835,false],[0.8019527196884155,true],[1.1540179252624512,true],[-1.4343260526657104,true],[1.4069069623947144,true],[0.5078597664833069,true],[0.1831521838903427,false],[-0.5352457761764526,false],[1.3706591129302979,true],[-0.8636290431022644,false],[0.8164027333259583,false],[0.6665022969245911,false],[0.5028047561645508,false],[-0.7765756845474243,false],[1.204775333404541,false],[1.2527906894683838,false],[0.7420544028282166,false],[1.0363034009933472,true],[1.0559784173965454,false],[-0.72457355260849,false],[1.9217685461044312,true],[0.9770780205726624,false],[0.8808136582374573,true],[1.0174754858016968,false],[0.4287119507789612,false],[1.0718724727630615,true],[0.8409612774848938,true],[-1.3366127014160156,false]]") + +test_set = [] + +for score, ground_truth in data: + for mat in mats: + filename, jscore = mat + iscore = float(jscore) + if abs(iscore - score) < 1e-10: + test_set.append((filename, ground_truth)) + +with open("test_set.json", "w") as f: + json.dump(test_set, f) \ No newline at end of file diff --git a/meme-rater/test_set.json b/meme-rater/test_set.json new file mode 100644 index 0000000..d30b1d3 --- /dev/null +++ b/meme-rater/test_set.json @@ -0,0 +1 @@ +[["images/9e/t3_1c629c3.jpg", true], ["images/16/t3_1b80tkn.png", true], ["images/a2/t3_1bsqrmg.jpg", true], ["images/e7/t3_1c1yrql.jpg", false], ["images/0f/t3_1b80fhz.png", true], ["images/76/t3_1bis1mq.jpg", true], ["images/1a/t3_1bqbba4.jpg", true], ["images/fa/t3_1c79pcf.jpg", false], ["images/e0/t3_1b9rnxe.jpg", true], ["images/01/t3_1bhs3b6.png", true], ["images/e3/t3_1952pjz.jpg", true], ["images/08/t3_18znjbg.jpg", true], ["images/d5/t3_1c1ax74.png", true], ["images/82/t3_1c3di25.png", true], ["images/3d/t3_196r2zj.jpg", false], ["images/50/t3_1b7mhci.jpg", true], ["images/ca/t3_1c817br.jpg", false], ["images/7b/t3_1bd1ic1.png", true], ["images/53/t3_1asiuj0.png", false], ["images/db/t3_1bme7zq.jpg", false], ["images/cf/t3_1by5xhq.jpg", true], ["images/8a/t3_1bti2b3.png", false], ["images/25/t3_1bzkljx.jpg", true], ["images/6e/t3_1ayexvf.jpg", true], ["images/be/t3_1c1mxy4.jpg", false], ["images/bf/t3_1axwzyg.jpg", false], ["images/e4/t3_1c38wlq.jpg", false], ["images/f7/t3_1ax5or6.jpg", false], ["images/d7/t3_1b1ztpm.jpg", false], ["images/26/t3_1atpqj0.jpg", false], ["images/1b/t3_1948c21.jpg", true], ["images/0a/t3_1b9vtbr.jpg", false], ["images/03/t3_1932ojp.jpg", false], ["images/50/t3_1bng5ec.jpg", true], ["images/a9/t3_1bhxbp6.png", false], ["images/7c/t3_1ag5j01.png", false], ["images/5f/t3_1annhxb.jpg", true], ["images/19/t3_1bs3dhz.jpg", true], ["images/db/t3_1bufrf3.png", true], ["images/66/t3_1bo3gpz.jpg", true], ["images/45/t3_1bxa8ll.png", true], ["images/5c/t3_1b9ccrj.jpg", true], ["images/ba/t3_18vq00r.png", true], ["images/30/t3_1btueiy.jpg", true], ["images/eb/t3_1ait5pn.jpg", true], ["images/64/t3_1bly2qd.png", false], ["images/82/t3_1b2qvrk.jpg", true], ["images/18/t3_1c4uh6y.jpg", false], ["images/66/t3_1b926z5.jpg", true], ["images/75/t3_1bv9w27.jpg", false], ["images/1a/t3_1bu9nbs.png", false], ["images/08/t3_1agoerq.jpg", true], ["images/c8/t3_193dmz5.jpg", false], ["images/32/t3_1bvdnmf.jpg", false], ["images/ec/t3_1ben6yk.jpg", false], ["images/ad/t3_1bb6izr.jpg", false], ["images/43/t3_1c1v4t0.jpg", false], ["images/16/t3_1bt51ty.png", false], ["images/99/t3_1977sqp.png", false], ["images/f8/t3_1bkekko.jpg", false], ["images/12/t3_1b154wm.jpg", false], ["images/3d/t3_1asqg1y.jpg", false], ["images/46/t3_1c2l473.png", true], ["images/62/t3_1apfbpl.jpg", false], ["images/e2/t3_1bxcjyz.jpg", true], ["images/71/t3_1bue6k1.jpg", true], ["images/d9/t3_1bwy4hh.png", false], ["images/1b/t3_1bibmsb.jpg", true], ["images/f5/t3_1bzvze6.jpg", true], ["images/61/t3_1bvdena.png", false], ["images/d8/t3_1avfm07.png", true], ["images/56/t3_1b1bo9h.jpg", false], ["images/cd/t3_1bw1xla.png", false], ["images/9e/t3_1bvx7r2.jpg", false], ["images/72/t3_1c0q3j2.png", false], ["images/27/t3_1aufbas.jpg", false], ["images/74/t3_1ankg9v.jpg", false], ["images/7b/t3_196avgd.jpg", false], ["images/29/t3_1algegh.jpg", false], ["images/67/t3_18xu5mh.jpg", true], ["images/0a/t3_1c660gk.jpg", false], ["images/3c/t3_1av2i01.png", false], ["images/77/t3_1c20gib.jpg", false], ["images/ec/t3_1bnlcwa.png", false], ["images/de/t3_1blb0wx.jpg", false], ["images/f9/t3_1bfad2h.jpg", false], ["images/97/t3_1b5vshy.jpg", false], ["images/77/t3_1anrtjz.jpg", false], ["images/bb/t3_1b8z333.jpg", false], ["images/02/t3_1bqwm85.jpg", true], ["images/c9/t3_1bf2m72.png", true], ["images/fa/t3_1akw2zd.jpg", true], ["images/12/t3_19f97fr.jpg", true], ["images/65/t3_1bain19.jpg", false], ["images/9f/t3_1bk2fme.jpg", false], ["images/e8/t3_1ac6pl8.jpg", true], ["images/fb/t3_1b91wsx.jpg", true], ["images/ee/t3_1aehd5b.jpg", false], ["images/9c/t3_1b727pf.jpg", false], ["images/fc/t3_190vaxm.png", false], ["images/63/t3_19f7lz0.jpg", true], ["images/16/t3_1b76af8.png", true], ["images/76/t3_1c2dwep.jpg", true], ["images/7d/t3_1c1dk06.jpg", true], ["images/7e/t3_1as79pz.jpg", false], ["images/3d/t3_1c2pkue.png", true], ["images/59/t3_1bu0oes.jpg", false], ["images/ae/t3_1c47sct.jpg", false], ["images/3a/t3_1c4qpf3.png", true], ["images/f2/t3_1c0m4fp.png", false], ["images/8b/t3_1bv8dkz.png", true], ["images/4e/t3_1aw62nr.jpg", false], ["images/94/t3_1bwfzbk.jpg", false], ["images/a6/t3_1c6z9pu.jpg", false], ["images/35/t3_1anxtmx.jpg", false], ["images/47/t3_1boju8b.jpg", false], ["images/e3/t3_1ba68yl.png", false], ["images/48/t3_1bpgz7r.jpg", true], ["images/ad/t3_1avpse0.jpg", false], ["images/85/t3_1c1dcho.jpg", true], ["images/49/t3_1c7ry7m.png", true], ["images/15/t3_19eyodb.jpg", true], ["images/b9/t3_1ahuipx.png", false], ["images/7b/t3_1bxf57r.jpg", true], ["images/0b/t3_1b8261y.jpg", true], ["images/83/t3_1bnrx79.png", true], ["images/23/t3_1c4yv94.png", true], ["images/3c/t3_1bzsos5.jpg", true], ["images/b6/t3_1af5hzv.jpg", false], ["images/d8/t3_1az3d1d.png", false], ["images/1d/t3_1bqe869.jpg", true], ["images/44/t3_1bus2oy.png", false], ["images/5d/t3_1c37jjf.jpg", false], ["images/db/t3_1c7460m.jpg", false], ["images/5d/t3_1bq4bty.jpg", false], ["images/e2/t3_1biig98.jpg", false], ["images/97/t3_1aifz65.png", false], ["images/b1/t3_1blpr2b.jpg", false], ["images/6d/t3_1bbdyd1.png", false], ["images/df/t3_1bip3yf.jpg", true], ["images/90/t3_1bt6s3q.png", false], ["images/bf/t3_1bvoczg.jpg", false], ["images/74/t3_1952vpd.png", true], ["images/14/t3_1bhsyu4.jpg", false], ["images/bd/t3_1byfzg5.jpg", true], ["images/0d/t3_1bn9zck.jpg", false], ["images/89/t3_1awavf7.jpg", false], ["images/95/t3_1c1eb12.jpg", true], ["images/7a/t3_1bnz2r1.jpg", true], ["images/c2/t3_1byv6jr.png", false]] \ No newline at end of file