Skip to content

Commit

Permalink
blur detection code
Browse files Browse the repository at this point in the history
  • Loading branch information
RonakDedhiya authored Sep 30, 2024
1 parent 110931f commit 7ecee0d
Show file tree
Hide file tree
Showing 31 changed files with 3,905 additions and 0 deletions.
719 changes: 719 additions & 0 deletions Code/BlurDetection/BlurDetection.ipynb

Large diffs are not rendered by default.

646 changes: 646 additions & 0 deletions Code/BlurDetection/TrainNetwork.ipynb

Large diffs are not rendered by default.

504 changes: 504 additions & 0 deletions Code/BlurDetection/TrainNetwork1.ipynb

Large diffs are not rendered by default.

754 changes: 754 additions & 0 deletions Code/BlurDetection/TrainNetworkMulti.ipynb

Large diffs are not rendered by default.

36 changes: 36 additions & 0 deletions Code/BlurDetection/X_test_fft.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
min,mean,max,std
21.531595408108963,29.87376529645923,42.72090874686028,5.405600867532463
20.216149873823372,28.52085480441143,40.797423325778674,5.290907239037773
17.53616765221753,25.641657995349735,37.33319105176178,5.12691622858238
7.576908239486671,17.06118480866069,28.16673518599857,5.089115009977336
0.28515043720381156,11.142144835759,21.0435625001095,4.830618256980458
18.23661682498695,23.08375286878893,26.972664018968,2.2187266586669665
16.85561691694509,22.16919910436916,25.901382470237554,2.197147188051259
13.984944839344722,19.129006902983175,22.540465915860814,2.0399442542523243
0.33561288414842744,5.700151535710567,9.573730536676914,2.27232274175423
-7.0257505659406485,-2.7941088144135615,1.2278464950005106,2.4568587729263744
8.093192785299719,11.59515321263949,15.370265249534617,1.7930574102374117
7.586794226107202,10.763776354578937,14.583341711027087,1.7421518715392885
5.8476442957654395,8.476716267527207,12.096025765047614,1.5210739074837787
-1.7471953597496326,1.459268203291185,4.99424444726533,1.5236263352566295
-6.648174224134689,-3.241527707105753,0.5683998148175325,1.8587484216151304
27.888672101338642,29.73830054523268,32.38587183594377,1.1141678744800267
26.392637045327536,28.060238452786724,30.4106177174012,1.0796852856739803
23.771691634977024,25.30158239878729,27.597210343826486,1.0283912762618037
18.429276961782357,19.646612842671495,21.416080742111802,0.7537438063056228
12.317762068216492,13.344216873461592,14.790275323768634,0.6029218952079135
16.84112359917696,19.25996391422522,20.4255603604718,0.5464867583681107
14.8003936404019,17.754029157284865,18.9735176265582,0.6499104850043943
12.375904380340161,15.041386786244741,16.12084002380797,0.5815752687393929
5.149097349108637,7.327109525991215,8.50258565845208,0.5043966284441849
0.30616840008269997,2.2191973445015942,3.4476478799839603,0.5020600992984154
43.22857067231837,43.86805005362926,44.767014053425925,0.3065330220942219
40.40133278676875,41.33034070284039,41.97609344461869,0.282270448887174
35.13539952719875,36.06461242930665,36.662602323720456,0.2533035321417649
18.79724295756119,20.0542553265069,20.725178204254956,0.3098798697169552
9.24936476321129,10.138940748830738,11.052379272269194,0.31806759169387117
23.907367394625805,28.95797928803364,31.25996908107089,1.2777035412650282
22.93199409300751,27.506559156629628,29.220325899402095,1.1273053504437482
20.819927745387606,24.41663283738316,25.89036598360826,0.8865844502600543
13.091272283296583,16.257149478664207,17.619004140572766,0.7056766628026977
5.797163083686963,9.507233105828025,10.801375289829082,0.7927626013245344
36 changes: 36 additions & 0 deletions Code/BlurDetection/X_test_hwt.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
min,mean,max,std
0.2523364485981308,0.381390069083239,0.5863060989643268,0.09426973588795333
0.44436997319034854,0.5746856892925973,0.7694859038142621,0.0769904956802218
0.7480628272251308,0.8269907693649343,0.9295921924015337,0.03905321235598433
0.9470642625982432,0.9888449985253123,1.0,0.015547730586564458
0.9925531914893617,0.9998398799361516,1.0,0.0008682432432773699
0.44980562542876745,0.5985801500238729,0.7142454160789845,0.061917449624178895
0.5772281847876808,0.708088753182954,0.8147342244327013,0.052377164319260136
0.9064386317907445,0.9431881903878493,0.9644910382144065,0.013701050372001936
0.9992942836979535,0.9999900372454028,1.0,7.117387203921649e-05
1.0,1.0,1.0,0.0
0.8183118741058655,0.880857796240834,0.943657728231395,0.029243696084778385
0.8385283597342872,0.9119534844877718,0.9479297365119197,0.03331747875200624
0.922365988909427,0.9722194870223286,0.9925681255161024,0.01726593752323111
0.9973753280839895,0.9999367141939498,1.0,0.0002767284103020225
1.0,1.0,1.0,0.0
0.322998046875,0.36873427651940793,0.4530838165524512,0.029356141272823547
0.5311372926184179,0.6129399275026752,0.7278947368421053,0.04167211700430814
0.8024263431542461,0.8592491217486281,0.9265428727471328,0.02441151935150512
0.9860416117987885,0.9982055764497102,1.0,0.002650416892103494
1.0,1.0,1.0,0.0
0.7713815789473685,0.7858427929598795,0.8273894436519258,0.0067505854518527825
0.8201438848920863,0.8328789168367005,0.8625198098256736,0.0054320045078997325
0.9037945573016481,0.912390567935812,0.9252300613496932,0.0038087590427946074
0.99856184084372,0.999529739368621,1.0,0.000263877554079976
1.0,1.0,1.0,0.0
0.22349304482225657,0.24897665672628733,0.26876550868486354,0.007876366907705828
0.37870195337114054,0.4184709076915766,0.45419725502713054,0.012011845271911464
0.8125701459034792,0.8271585028460103,0.8422093981863149,0.0043348362779286505
0.9995958779551425,0.9999329552719354,1.0,0.0001092923180374663
1.0,1.0,1.0,0.0
0.7142259414225941,0.7827957507970398,0.886485280999108,0.04932752181720721
0.8130472854640981,0.8586726816134653,0.9160470136723435,0.028555820796789595
0.8827071290944123,0.9214351615794243,0.9666834931852599,0.024513414465524335
0.9970544918998527,0.9993627902827135,1.0,0.00040186281913136935
1.0,1.0,1.0,0.0
36 changes: 36 additions & 0 deletions Code/BlurDetection/X_test_laplacian.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
min,mean,max,std
126.85546995526975,273.65736353759866,624.6130348151539,76.92536665791837
61.66331297983811,125.17546212807102,241.74280236928013,31.110750387231395
19.797327345175177,35.099241730785735,71.26252309230851,7.920579181148632
4.405994682182701,7.65123316935868,17.782856326189066,2.267894800339584
3.128771192250938,5.250016165283263,9.105120898535871,1.1476129418268801
123.43823965204304,183.2838837009207,261.66884107706386,30.967527941330346
80.34622009426164,124.21221947346272,169.50606469625254,19.12963601369801
25.86263035545028,41.586709625768165,54.73328399800512,5.617326797140299
3.266040616188461,5.570037895209248,7.496269273419492,0.9306397119826756
2.1567191173158697,3.3005072027718185,4.526001156201777,0.5295569835601894
33.66024774177154,51.58628741000241,77.86852587909026,11.50192242989663
20.67711044689585,26.938815540491326,34.28137095392987,2.398867235739986
8.818846111430519,12.662986168830953,16.050594923882294,1.1630724290719117
2.6254907705743364,4.251703704551549,5.830076077209577,0.6149221424857831
1.8471855322734476,3.1393047093690476,4.384927017231916,0.5375630029000877
191.3118108155186,314.239234598982,443.77945758224035,46.18316664140058
55.936666287111855,97.83000423783278,135.75336002764075,17.16456072491156
21.775603891600078,36.283524932721406,52.123240478440245,5.817428091746521
9.264047016963254,12.156721087648354,17.559968608728624,1.374746025007754
5.069195118426388,6.534562788102973,8.535008638350044,0.6188231113713837
46.71924260819793,58.68025767687498,63.812674524243015,2.7916942273184353
29.739388918772722,37.14868129815191,40.082367268710684,1.8373602013695172
13.845235769727047,16.98243727162983,18.370606656922426,0.8651583354121101
4.43395105138964,6.07416889069857,6.822735810807861,0.46942404651249525
3.180717091975701,4.469882581997649,5.102544360875304,0.3834923294163784
827.3568393349948,940.1879327255049,1137.4461897676103,44.37377429132447
326.9390580762764,376.41168433215887,453.51170999388296,18.649906183215766
77.25407693436229,89.10837669335702,101.48312374997846,3.6042060469784154
8.964924285612156,11.04103654665313,12.526804875503347,0.7902967688784833
4.909182569864323,6.569232995815579,7.940267063810087,0.7091724989358479
35.989936780432394,76.82682734427233,143.81345630041875,24.669215816898664
24.640171547059538,43.364395039927636,73.16926407982163,11.847281228810107
13.19255159800454,21.583300559277237,32.52229207520289,4.747020575308702
5.27721928845641,7.151166767342029,9.096365729278858,0.7636956618516039
3.682985573246124,5.2943175540562555,6.436655084889013,0.5755092353204929
36 changes: 36 additions & 0 deletions Code/BlurDetection/X_test_modified_laplacian.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
min,mean,max,std
104.3248476080247,142.05026605950843,171.36216435185185,16.973212781577768
102.36673948688272,139.81698798981532,169.66087577160494,16.956579686155774
101.08081211419753,138.4568424615351,168.71221836419753,16.86286715697635
100.0029157021605,137.2996443263325,167.77689911265432,16.820437655744506
99.80216435185186,137.0917866996201,167.59176311728396,16.82793036537965
159.63785590277777,167.28400017239346,173.50859423225307,4.765397679315337
158.22883246527778,165.80766325949253,172.04561969521606,4.748533469142152
156.06111255787036,163.62485640393646,169.98092447916667,4.878005587563826
153.57404996141975,161.3533350813005,167.81948543595678,4.972737393161305
153.19456163194445,161.01173493191422,167.51995081018518,4.986017011135635
124.85830054012345,131.17805955457118,140.2505324074074,3.5547169219937924
124.4836545138889,130.70727786717885,139.9839597800926,3.6105379484502915
124.1136043595679,130.33374244576976,139.68429880401234,3.6283773496216924
123.63015769675926,129.83868104421734,139.2018754822531,3.626272674952806
123.42169994212964,129.63915387173927,139.00746238425927,3.6231810046537802
111.91635030864198,120.89278855131172,124.00065827546297,3.3922351126644217
110.55586275077161,119.46111435988942,122.43070505401235,3.4071963038315873
109.38984471450617,118.38151255947787,121.40518566743827,3.489077413577215
108.3273080632716,117.38171797678753,120.59027922453704,3.554299689336298
107.99734567901234,117.04601057741769,120.27417148919753,3.5613023930100716
43.18939525462963,47.945863929076644,50.56521701388889,2.0528776938040507
42.67452256944444,47.42304284336419,50.066156925154324,2.046840174314805
42.15017939814815,46.85978442644033,49.44483458719136,2.050411661124774
41.467557388117285,46.16452661072531,48.699176311728394,2.050588712146288
41.24582417052469,45.94672119341564,48.46303337191358,2.0508772336944476
140.35530767746914,142.98126427308384,144.5023369984568,0.717602182929318
136.63450569058642,139.3290533259388,140.6663570601852,0.7605602947429965
132.2539125192901,134.39749224054782,135.52857011959875,0.6859903061800099
129.23268277391975,130.90185361207563,131.93182629243827,0.6245773153517261
128.779972029321,130.40035371013374,131.4641835455247,0.6233156942884039
74.25796923225309,83.38847792434426,91.20889515817902,6.069762111911234
74.47909770447531,83.75062350036914,91.62654562114197,6.160954923817771
73.7647583912037,83.17791866937881,91.20764226466049,6.270528240100374
72.75224006558642,82.34359865103717,90.62524016203703,6.439004982114112
72.51615210262345,82.1302028523107,90.44446903935186,6.454469336145204
36 changes: 36 additions & 0 deletions Code/BlurDetection/X_test_tenengrad.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
min,mean,max,std
335.41213723123496,506.4056953110869,765.9236420695989,84.43900506504964
294.1957028354844,443.53593873312974,662.9084055836629,75.1141842713925
239.88270013054273,358.45632028603313,553.2242707456087,67.78473449596359
161.33831603320962,247.2543645534494,410.71273886680825,61.528595128923726
123.7905785782718,194.37208724092554,325.3055582674049,53.07809012949872
392.3479227206732,486.0094760215899,573.6788170561521,43.186204549516056
349.9121690344738,445.7141469814325,519.7187799256324,37.931653596249305
273.91131845161095,348.7581265489456,400.74530809099235,27.73691280728066
125.43668852897108,162.0288228323433,193.23324110315335,18.305209644968517
88.69058236114174,110.02216014920629,132.68556444587819,13.90743255416564
174.07978671894193,217.8940849928395,266.3107924806651,24.577473238096523
163.67847747620831,193.18627316590823,234.66382530724667,17.457949770287186
128.45562167329004,158.15660398505239,188.4503002509131,10.2320478711555
87.16694633159737,111.45420573800241,131.94179774443586,6.8993263487939815
68.81005545169573,86.81271777230094,103.34169957869244,5.48244749008415
488.9945327720535,554.639124724998,630.3984973115423,29.616231858025806
413.5418650966413,464.83968326027525,520.2390337954691,25.575544946060663
329.85533969500483,367.8069130437103,414.3772776963365,21.219982438143955
243.2800362257311,264.9569731757772,297.1978194353307,14.193055351502128
179.65014952252093,194.02770411038156,221.31942053291635,11.610604126307017
290.2597438245646,330.5112457338679,345.40434480734285,8.307157505909881
255.9703511942301,297.45323188779935,310.0964728256106,8.413306340627361
222.36453170548754,254.0880376126295,263.27804928787833,6.376434561727781
163.16493723803416,179.61973842484414,186.6463205622454,3.4319965321107233
133.3440881915762,143.63508493616882,150.13146011734452,2.395955232598512
983.8881947320142,1024.3956295444161,1054.7863527406616,11.364660198690615
822.685665036312,875.426888267784,896.2858752096573,11.002045481861286
596.1390687691666,637.0830191833749,651.0185534636596,8.017801521242427
305.71370153485174,328.4565867346599,334.6478300176915,4.399591176263695
206.88717396678288,217.58093008448859,221.6443536043312,2.302370131977221
333.1982575042855,426.5466679919671,504.5443257957091,40.601395756373385
318.7492207417121,390.54693212965947,444.57841626767976,31.166842256240347
294.88256555938244,336.3514783981726,368.9491388379721,18.966750981859636
224.0690412899053,244.11515129899576,261.4762498615521,6.669213284410634
180.52364214607715,195.18791605985294,205.50373405989805,5.028097235406053
91 changes: 91 additions & 0 deletions Code/BlurDetection/X_train_fft.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
min,mean,max,std
40.40187535982148,41.2960364566954,42.51777613815489,0.5154163421458806
38.189450519840435,39.024759304504734,40.17778645676754,0.5116999850272709
33.23214024146941,34.081153117507874,35.21199066979788,0.5015834517887345
22.45172059556596,23.322020819399878,24.343050088240798,0.47085831726165517
16.017660011167,16.72954537574848,17.57059069649812,0.3720254610266965
31.654062611420084,34.40380859184473,35.74919073821878,0.7357039592072817
29.755655324391043,32.82245922150457,34.06567067761955,0.7582904964146266
26.451323643459567,29.4718619499409,30.680863843504216,0.7367459150992408
18.309016246796904,21.08474115642569,22.125423833302307,0.674678918643604
12.64747650998431,15.116531032273931,16.32289814868002,0.6524330572343476
34.4847382191056,37.19695670336788,38.67880177135768,0.7273091223822413
32.925129396201136,35.08982366067516,36.28274953964791,0.6073564653462448
29.834203809714534,31.461925517534667,32.31805445259141,0.47073082921069165
20.060420463903455,21.2062761201744,22.102898214911086,0.36033846219809895
13.073026106600414,14.288040187691433,15.341280389152656,0.3648363164820043
25.084022335310785,28.210689964056623,31.834868087498545,1.5111024047915131
23.660292279051735,26.624735034139132,30.07666654453469,1.527795869379724
19.441723999813924,22.73095969764865,25.9795211613883,1.457881569142375
5.888201496671476,10.82818788824733,14.226096402515989,1.6108642204581343
-1.0252260141595149,3.718315184088015,6.924001402031182,1.5137432660975554
23.03029439497809,33.734976113636435,38.137707877913854,4.279852973800912
21.875267200988095,30.65943047187133,35.07039387109579,3.5054774929437196
18.462611737169624,25.40649322753978,29.975096632398742,2.7507742278057026
6.927099425604863,11.271337670347775,16.350875828090768,2.1059025557674658
-0.4149320528264827,3.122360325767062,7.070117580262758,1.658709133994002
39.0018825938379,40.10919594798644,41.53071812510394,0.5259837673706029
37.444625636619215,38.48766628420384,39.944216295290076,0.48388167030009754
33.574644939327726,34.64248565183118,36.12420529200402,0.44569828050085236
24.899213502482876,26.373060134686067,28.006313155353446,0.4826820020385505
19.34761539423653,21.134807525432258,22.849092071059722,0.5263583625238181
32.538750414641,34.72235346994223,38.55828895440057,1.3130983478302969
30.402449186709518,32.5257983135995,35.94176379896407,1.221434030015968
26.75100898940073,28.81595318553307,32.164898982136144,1.1897250345077388
17.66983150506992,19.739887722696054,22.862795610595747,1.0668192320718068
10.871706709574754,13.255828404610037,15.722112307062039,1.035099938027414
26.14096898381557,28.609322102137764,30.703082358719616,1.361303198789965
23.881072321949727,26.685729540838718,28.75454150766884,1.4337030237025123
20.9111478041833,23.319812872084675,25.33620518919052,1.4046524898117099
11.754564306576185,14.052240216255532,16.065089263832792,1.322012504384731
4.1333560795874345,6.419988279785895,8.470091330133883,1.086116972212852
30.068341454844187,31.219739594011376,31.617319951139887,0.25466589544387824
27.155330864984727,28.97006420333437,29.40510633007875,0.37966650464877816
23.494112397627738,25.32124659327237,25.753854646021427,0.3805030597914013
16.10139025135556,17.36951228753929,17.8116923056727,0.2952682773173713
10.160533110786227,11.158251371930014,11.569006374697905,0.25319082938065
27.824193700278617,29.20218030116584,30.01844624546323,0.39417525863515235
26.05405970661003,27.680738820288536,28.52829436399821,0.406274086736325
23.27158345265326,24.81836258285218,25.656076839131714,0.3862022173196665
14.356777142671818,15.669791801619747,16.572411543345694,0.3672824434878224
6.889410622310856,7.729820443146382,8.565166986777706,0.30580568188818047
21.562540414501694,30.63078864970246,34.32979442866343,2.1124369456955407
20.93921723747736,29.28966257475337,32.70582108961849,1.9850367467590384
19.091230532711457,26.487971981370848,29.57197366972084,1.818635808809358
11.647958680760734,18.977380776356107,22.06028059406124,1.7550149024449224
5.398144209484158,12.964969637666576,15.597922393199529,1.5388673394820132
34.48835797875193,37.614860621341364,41.20481860694096,1.3689861976035267
32.53582887248832,35.49501830011209,38.89797976504337,1.2823380924553753
28.609353335795166,31.264905441056808,34.221125503180275,1.2410575132548713
16.401401833306863,18.58203674544296,20.70571615399172,0.9542875883347168
7.822443644201458,9.686125835392131,11.549006246419042,0.797025989454443
11.5350262100488,14.721134199029974,19.180698801638968,1.3205705687483658
10.24207838205956,13.1947805158707,16.327101968532514,1.1608470377788642
8.350732983577117,10.851512981227383,13.408223230007161,0.9839344569444753
0.8718862746428128,2.918400377206089,5.198677585126928,0.8573754414802098
-6.984466232424238,-4.265691227911021,-2.071858905438698,0.8759658588594561
37.566460451893434,38.31807065546817,38.842405060192924,0.19803729971183917
35.14712191083199,36.1741114490633,36.645660610149655,0.22844946954580284
31.783146139947583,32.77644862749566,33.208221635101694,0.22022714241717706
22.797632142406897,23.705445303178553,24.04298200561316,0.19494199104798687
15.063831895775332,15.882625818951505,16.33799091837554,0.23184636281153337
35.555954098541164,36.85651539084341,38.714819126715426,0.8797461532797658
34.222177852160044,35.42667686366103,37.182000600310126,0.8611301523411756
30.853634297129535,32.04839257770228,33.72647899865908,0.8158108376349642
23.779134912741615,25.02949053551394,26.81453256485075,0.7808472851550249
18.463366588314226,19.790851341321684,21.678449750842887,0.7402044028983424
25.57218421255968,28.5624148608606,31.65898307539884,1.5136994039448959
24.632194185468563,27.513721126910873,30.19054455527172,1.3849950205935166
22.133744257116494,24.860547829931686,27.116946113248396,1.1975776869364454
10.237310871769415,12.31143761881311,13.659632631257399,0.725223618093378
0.36177392281332305,1.6853692130563143,3.5680709036930343,0.682480320774216
31.240499875208076,31.97022281480195,32.50955831026551,0.22356156497308868
29.050822538915043,30.23855247233275,30.698685150115015,0.28028682930941784
25.280138843534743,26.528418960541796,26.939759101298197,0.2893353248989635
15.219021957336668,16.167072174806357,16.702147040007212,0.2868873401579499
9.296417567351115,10.183963568530912,10.810520663133858,0.3202325060010032
34.58297786693582,35.9395961079883,39.15300565218216,0.6355311304264967
33.16758129406672,34.38904367303894,36.948639778910845,0.5828401866849231
30.015101048557305,31.16021848368194,33.388579769074816,0.5427802182985004
19.925666104473063,20.942611847169548,22.421473491804676,0.4863609522423086
10.066448878663286,11.409686580986712,13.51574062876193,0.7632006046349693
Loading

0 comments on commit 7ecee0d

Please sign in to comment.