Here is the code I used to make my Thread Portrait.
How it works is that you run the first code (keep in mind that the code works for this picture, in particular, if you want to do it with your picture, go in the code and change the name and size accordantly)
The first code (List generator.py) will give you a list of points if you want to see the full image, run "Final Picture.py", same with the animation.
Note that your picture will probably not work at first, tweak the contrast and brightness until it works. (if that doesn't work there are like 3000 codes that do the same on git)
This was heavily inspired by u/L-aerodyne, here is the original reddit post: https://www.reddit.com/r/interestingasfuck/comments/m7q70e/i_wrote_an_algorithm_to_create_portraits_from/