\"} ;window.thread_json=[{"no":127276,"resto":0,"com":"[s |font-size:18]□□□□□□□□□□□□□□[/s]!?","title":"□□□□□□□□□□□□□□!?","name":"Anonymous ","time":1794373780,"last_modified":1794450162,"tn_h":143,"tn_w":255,"h":720,"w":1280,"board":"jp","fsize":20020,"filename":"squares","ext":"png","file_id":"1794373780410","location":"haiji","md5":"6acaa990f034f515f37c349289e68470","last_replies":[{"no":127279,"resto":127276,"com":"ろろろろろろろろろろろろろろ!","title":"[720p Remux] Hidamari Sketch Hoshimittsu 02v2 [BDrip x264 AAC] [6676075A].mkv_snapshot_17.19_[2018.02.01_04.04.05].jpg","name":"Anonymous ","time":1794374260,"last_modified":1794374260,"tn_h":98,"tn_w":175,"h":720,"w":1280,"board":"jp","fsize":108220,"filename":"[720p Remux] Hidamari Sketch Hoshimittsu 02v2 [BDrip x264 AAC] [6676075A].mkv_snapshot_17.19_[2018.02.01_04.04.05]","ext":"jpg","file_id":"1794374260112","location":"haiji","md5":"a181786907fdb7b46979a052af6ecb04","cites":[{"post":"127319","board":"jp","host":"127276"}]},{"no":127317,"resto":127276,"com":"After working on it a bit more i got some various results that i felt was kind of cool so i'm sharing them.","title":"squares 1.png","opt":"sage","name":"Anonymous ","time":1794389488,"last_modified":1794389488,"tn_h":98,"tn_w":175,"h":720,"w":1280,"board":"jp","fsize":93145,"filename":"squares 1","ext":"png","file_id":"1794389488295","location":"haiji","md5":"9142193cfee47c9a8bf3be8d6285aa1b"},{"no":127318,"resto":127276,"com":"キタ───(゚∀゚)───!!","title":"squares 2.png","opt":"sage","name":"Anonymous ","time":1794389522,"last_modified":1794389522,"tn_h":98,"tn_w":175,"h":1080,"w":1920,"board":"jp","fsize":27816,"filename":"squares 2","ext":"png","file_id":"1794389522680","location":"haiji","md5":"b76474e0628112da5c207381ad5075a4"},{"no":127319,"resto":127276,"com":"[c jp|127276|127279]\>\>\>/jp/127279[/c]","title":"squares 3.jpg","opt":"sage","name":"Anonymous ","time":1794389595,"last_modified":1794389595,"tn_h":98,"tn_w":175,"h":720,"w":1280,"board":"jp","fsize":78490,"filename":"squares 3","ext":"jpg","file_id":"1794389595107","location":"haiji","md5":"aba0ff4b84e51450280dfa2683fce5dd","cites":[{"post":"127358","board":"jp","host":"127276"}]},{"no":127323,"resto":127276,"com":"Final one.[br][/br]Also, for anyone curious, this was just a simple test in how well AI could actually generate proper working code. For in this example project it was to \"try and recreate an image by randomly drawing squares on a white image\".[br][/br]It went... depressingly well. These images are proof the code worked, without any manual bug testing or optimization, it could do that all on it's own. It's scary how well it could generate everything from simple incremental instructions. Anyone with an IT job is gonna end up as a NEET (yay!) if this continues at this rate, whether you like it or not... sigh...[br][/br]Also, maybe this should've been a /maho/ thread... oh well... i'm still kind of sick and getting pretty tired so going to bed. Oyasumi!","title":"squares 4.png","name":"Anonymous ","time":1794390238,"last_modified":1794390238,"tn_h":175,"tn_w":88,"h":3000,"w":1500,"board":"jp","fsize":266631,"filename":"squares 4","ext":"png","file_id":"1794390237834","location":"haiji","md5":"1f9b35ec7f0f7c6b26f061b5d655af52","cites":[{"post":"127337","board":"jp","host":"127276"},{"post":"127343","board":"jp","host":"127276"},{"post":"127350","board":"jp","host":"127276"}]},{"no":127337,"resto":127276,"com":"[c jp|127276|127323]\>\>\>/jp/127323[/c][br][/br]Took me like 10 minutes to come up with this, how did AI do it?[br][/br][code]import sys[br][/br]from PIL impor[wbr][/wbr]t Image[br][/br]import numpy a[wbr][/wbr]s np[br][/br][br][/br]orig = np[wbr][/wbr].asarray(Image.[wbr][/wbr]open(sys.argv[[wbr][/wbr]1]))[br][/br][br][/br]redraw = n[wbr][/wbr]p.full(orig.sh[wbr][/wbr]ape, 255, dtyp[wbr][/wbr]e=orig.dtype)[br][/br][br][/br]n = int(sy[wbr][/wbr]s.argv[2])[br][/br][br][/br]for i in r[wbr][/wbr]ange(0, len(orig),[wbr][/wbr] n):[br][/br] fo[wbr][/wbr]r j in ran[wbr][/wbr]ge(0, len(orig[i]), n):[br][/br] [wbr][/wbr] redr[wbr][/wbr]aw[i:i+n, j:j+[wbr][/wbr]n] = o[wbr][/wbr]rig[i][j][br][/br][br][/br]Image.fromarray(re[wbr][/wbr]draw).show()[/code][br][/br][br][/br]ran with:[br][/br][code]python file.py[wbr][/wbr] [image] [int][/code][br][/br][br][/br]where [code]n[/code] is how pixelated you want it to be","title":"C-1794396264524.png","name":"Anonymous ","time":1794396266,"last_modified":1794396266,"tn_h":98,"tn_w":175,"h":720,"w":1280,"board":"jp","fsize":24189,"filename":"C-1794396264524","ext":"png","file_id":"1794396266444","location":"haiji","md5":"8799164459d53469443c9ec76eae9551","cites":[{"post":"127382","board":"jp","host":"127276"}]},{"no":127338,"resto":127276,"com":"fuck squares","title":"nailedit.png","name":"Anonymous ","time":1794397415,"last_modified":1794397415,"tn_h":109,"tn_w":175,"h":738,"w":1180,"board":"jp","fsize":10592,"filename":"nailedit","ext":"png","file_id":"1794397415317","location":"haiji","md5":"465cc402a1abb31e2f00f381ba9efcf9","cites":[{"post":"127382","board":"jp","host":"127276"}]},{"no":127341,"resto":127276,"com":"fuck squares 2","title":"nailedit2.png","name":"Anonymous ","time":1794399253,"last_modified":1794399253,"tn_h":137,"tn_w":175,"h":995,"w":1270,"board":"jp","fsize":15000,"filename":"nailedit2","ext":"png","file_id":"1794399253615","location":"haiji","md5":"358e00025482260be6080f45180b8ff3","cites":[{"post":"127382","board":"jp","host":"127276"}]},{"no":127343,"resto":127276,"com":"[c jp|127276|127323]\>\>\>/jp/127323[/c][br][/br]Yeah, this agentic stuff is pretty powerful. Perfect time to finish studying computer science. It's as all the imageboard pros say - I didn't choose the NEET life, the NEET life chose me.","title":"76a9c295e4f32886483d8492f5c868fa.jpg","name":"Anonymous ","time":1794400395,"last_modified":1794400395,"tn_h":110,"tn_w":175,"h":1286,"w":2048,"board":"jp","fsize":173909,"filename":"76a9c295e4f32886483d8492f5c868fa","ext":"jpg","file_id":"1794400394740","location":"haiji","md5":"76a9c295e4f32886483d8492f5c868fa","cites":[{"post":"127382","board":"jp","host":"127276"}]},{"no":127345,"resto":127276,"com":"My attempt at pseudocode: [br][/br]Reduce the colors to about 7 colors, maybe blur it a bit. [br][/br]Pick a point at random. Make a small ring and see if its average color of it matches the center color. Repeatedly make bigger rings until the colors stop matching. Then draw a square of the same size. Repeat this fifty times or so.","name":"Anonymous ","time":1794400893,"last_modified":1794400893,"board":"jp","cites":[{"post":"127382","board":"jp","host":"127276"}]},{"no":127350,"resto":127276,"com":"[c jp|127276|127323]\>\>\>/jp/127323[/c][br][/br]you're too easily impressed anon[br][/br]this is stuff a junior dev could come up with","name":"Anonymous ","time":1794407105,"last_modified":1794407105,"board":"jp","cites":[{"post":"127382","board":"jp","host":"127276"}]},{"no":127358,"resto":127276,"com":"I'm more interested in why the results look patchy instead of pixelated[br][/br][c jp|127276|127319]\>\>\>/jp/127319[/c][br][/br]In this you can see the white background, and not sure how it does that.","name":"Anonymous ","time":1794430611,"last_modified":1794430611,"board":"jp","cites":[{"post":"127364","board":"jp","host":"127276"},{"post":"127382","board":"jp","host":"127276"}]},{"no":127364,"resto":127276,"com":"[c jp|127276|127358]\>\>\>/jp/127358[/c][br][/br]All squares are forced to be the same size and the size was chosen to be small. Small squares means there's more likely to be white gaps if you don't put in enough squares.","name":"Anonymous ","time":1794437870,"last_modified":1794437870,"board":"jp","cites":[{"post":"127382","board":"jp","host":"127276"}]},{"no":127366,"resto":127276,"com":"I'm pretty sure the algorithm works by repeatedly picking a point at random, and then drawing a square centered at that point. [br][/br][br][/br]Concerning the meta, there is a concept: try and recreate an image by randomly drawing squares on a white image. AI is used to communicate what is meant by that and to quickly prototype. Thus, it once again shows that it can be used as a tool. Even though AI was used to communicate the idea, the idea stands on its own, and we are responsible for exploring the idea and not being side-tracked over those two capital letters. [br][/br][br][/br]If there was a thread about pixelation algorithms, would the fact that someone could code one in 10 minutes make the topic not worth discussing? Also, I think it was good to put this in /jp/ because there is less pressure to seem technically complex.","name":"Anonymous ","time":1794438886,"last_modified":1794438886,"board":"jp","cites":[{"post":"127382","board":"jp","host":"127276"}]},{"no":127382,"resto":127276,"com":"Sorry, i've been busy sleeping off my cold but i'm much better now.[br][/br]I figured i could share the code if anyone wants to give it a try (had to put it in a .zip file to get it onto kissu).[br][/br]It's not a finished program, just a python script, so you need python 3.8 or later installed together with numpy Pillow and run [code]python main.py[wbr][/wbr] [iterations] [options[wbr][/wbr]][/code] with various arguments to make it work. Iterations is how many squares it will try to draw, and then there are various options for how to draw it and such. Also, it uses an input/output folder for reading and writing the images.[br][/br]Example: [code]python main.py[wbr][/wbr] 1000 -input \"test.png[wbr][/wbr]\" -minRect 4[wbr][/wbr] -maxRect 256 -selector sour[wbr][/wbr]ce -candidates 10 -scoring s[wbr][/wbr]at[/code][br][/br]Result: 1000 iterations of trying to recreate \"test.png\" in the input folder on a new white image to the output folder, by randomly drawing squares of size 4 to 256, drawing the square centered on a random source pixel on the new white image, generating 10 different squares each iteration and picking the best fitting one, as determined by the scorer \"SAT\".[br][/br]Also, i can't guarantee if this will actually work on another computer or just blow it up, so use caution before running random scripts shared over the internet![br][/br][c jp|127276|127337]\>\>\>/jp/127337[/c][br][/br]Yeah, that's just basic nearest neighbor pixelation on the original image, something that most image editor can do with a few clicks. Much simpler than this program.[br][/br][c jp|127276|127338]\>\>\>/jp/127338[/c][br][/br][c jp|127276|127341]\>\>\>/jp/127341[/c][br][/br]Nice! Did you you made them by hand? Or did you also write some code to generate it?[br][/br][c jp|127276|127343]\>\>\>/jp/127343[/c][br][/br]Yeah, no sure how this future will go for us all...[br][/br][c jp|127276|127345]\>\>\>/jp/127345[/c][br][/br]It's not exactly what this program was doing but too far off either. Roughly the same core idea. You don't really need to reduce the colors though, since if you randomly picking a point and color that exist on the original image, then over time squares with proportionally appropriate colors will happen naturally anyway.[br][/br][c jp|127276|127350]\>\>\>/jp/127350[/c][br][/br]Not sure what you mean by that. The project itself is simple, yes, but the point was to test a simple idea and see how far AI could go. And that you could just tell an AI to just make all that for you, that is still impressive to me. I've heard of what it can do many times, but to actually see it happen is strange. Also, the first version of the code it made was probably something that a junior dev could make too, but it was also horribly too slow on larger images. But then, even that it could easily optimize into something more manageable runtime wise.[br][/br][c jp|127276|127358]\>\>\>/jp/127358[/c][br][/br]It's not a pixelation effect on the image. It's randomly drawing squares on a white image that gets it closer and closer to the original image, so any random square, large or small that gets the white image closer to the original image, gets accepted. This is what gives it the patchy look.[br][/br]Then [c jp|127276|127364]\>\>\>/jp/127364[/c] gave a pretty good explanation to exactly why that one is very white with random same sized squares on it.[br][/br][c jp|127276|127366]\>\>\>/jp/127366[/c][br][/br]Yep, that's pretty much it, at least with the best options. I did have one option [code]-selector random[/code] that picked a random color and then drew a completely random square anywhere, like i did in my OP image, but it ends up very cruddy because of it.[br][/br]Anyway, this reply is getting far too long already so i think i'll end it here.","title":"main.zip","name":"Anonymous ","time":1794449483,"last_modified":1794449483,"tn_h":175,"tn_w":175,"board":"jp","fsize":6199,"filename":"main","ext":"zip","file_id":"1794449483643","static_thumb":true,"location":"haiji","md5":"ce7becba0b75ea2820bf68889a274390","cites":[{"post":"127383","board":"jp","host":"127276"}]},{"no":127383,"resto":127276,"com":"[c jp|127276|127382]\>\>\>/jp/127382[/c][br][/br]Drew them by hand in Paint's rectangle tool.[br][/br]Second image, I used the pipette tool to steal the colors off the OP. It was fun.","name":"Anonymous ","time":1794450162,"last_modified":1794450162,"board":"jp"}],"reply_count":16}] ;window.page_no=0