Anish Athalye writes about playful, research-flavored hacks, including hardware projects, security analysis and distributed systems testing.
HN commenters cite it for the PhotoDNA inversion work and the MacBook touchscreen hack, and point to it as related reading on constraint-based diagram design.
> They're not very good at all (it just uses a GAN over a recovered bitmask),
I think you're making my point here.
The first one's examples take hashes of known headshots, and recover really badly distorted headshots, which even occasionally vaguely resemble the original ones... but not enough that you'd know they were supposed to be the same person. Presumably if they had a better network, they'd get things that looked more human, but there's no sign they'd look more like the originals.
And to do even that, the GAN had to be trained over a database of... headshots. They can construct even more distorted headshots that collide with corporate logos. If they'd used a GAN trained on corporate logos, they would presumably get a distorted corporate logo when they tried to "reverse" any hash. A lot of the information there is coming from the model, not the hash.
The second one seems to be almost entirely about collisions. And the collisions they find are in fact among images that don't much resemble one another.
In the end, a PhotoDNA hash is 144 bytes, made from apparently a 26 by 26 pixel grayscale version of the original image (so 676 bytes). The information just isn't there. You might be able to recover the poses, but that's no more the original image than some stick figures would be, probably less.
Here's [the best "direct inversion" I can find](https://anishathalye.com/inverting-photodna/). That's still using machine learning, and therefore injects some information…
I, too, saw this approach on HN first – here: https://news.ycombinator.com/item?id=11071754
I combined the bare repo approach with a per-machine custom branch approach described in https://www.anishathalye.com/2014/08/03/managing-your-dotfiles/
The idea is that you have the shared configuration in one repo, and at the end of each config file, you include a local version. The local versions live in a separate repository and use a separate branch for each machine.
For example, at the end of .bashrc, you'd have
if [[ -r $HOME/.bashrc_local ]]; then
. "$HOME/.bashrc_local"
fi
and so on, for each config file. My general dotfiles repo is public here, if you want to take a look how I did it for the tools I use: https://github.com/bewuethr/dotfiles
This still isn't ideal. For example, I use Git submodules for Vim plugins in the shared repo – but maybe I don't need all of that on my Raspberry pi. I feel like at some point, a config file based solution could be better; or using a tool such as https://yadm.io/, which is using bare repos under the hood.
Here [1] is a cool project that uses Z3 to make graphics specified by constraints.
I remember reading an article about someone using Z3 to optimize the placement of cutout drawings on a piece of paper (kind of like a spritesheet) and optimizing for the smallest possible area in order to reduce the use of paper/materials. However, I can't seem to find the article anywhere.
One more use of z3 is as one of the available solvers for a tool called gnatprove [2], which is used to prove/verify the correctness of programs written in the SPARK subset of the Ada programming language. SPARK is used to program safety-critical aeronautical/military projects.
[1] https://www.anishathalye.com/2019/12/12/constraint-based-graphic-design/
[2] https://docs.adacore.com/spark2014-docs/html/ug/en/gnatprove.html
https://www.anishathalye.com/
I write mostly about playful hacks that I have worked on. Many posts tend to have a researchy flavor.
Some of my favorites:
* Turning a MacBook into a touchscreen with $1 of hardware: https://www.anishathalye.com/2018/04/03/macbook-touchscreen/
* Doing graphic design with an SMT solver: https://www.anishathalye.com/2019/12/12/constraint-based-graphic-design/
* Building a watch stand that automatically sets the time on my watch: https://www.anishathalye.com/2016/12/26/micro-wwvb/
(Love this idea for an Ask HN, by the way. Like other commenters, I wish HN had a way of filtering for blog posts written by HN users.)
There are a few things that need to come together for a complete diagram publishing system:
* Converting hand-drawn sketches to tidy diagrams [1]
* Converting tidy diagrams to look hand-drawn [2]
* A textual DSL for diagrams (e.g. Penrose)
* Support of declarative constraints for the diagram [3]
* Animation of the diagram [4][5]
[1] Paper https://www.fiftythree.com/think
[2] rough.js https://github.com/pshihn/rough
[3] Basalt https://www.anishathalye.com/2019/12/12/constraint-based-graphic-design/
[4] Distill https://distill.pub/2017/momentum/ source https://github.com/distillpub/post--momentum
[65] g9.js https://omrelli.ug/g9/
See also Anish Athalye 2019, "Experiments in Constraint-based Graphic Design" [1], which takes a similar approach to diagram creation. I'd also recommend looking at Keenan Crane's other research [2], in particular his book on Discrete Differential Geometry, which inspired some of the diagrams you see on the Penrose site.
[1]: https://www.anishathalye.com/2019/12/12/constraint-based-graphic-design/#case-studies
[2]: http://www.cs.cmu.edu/~kmcrane/