Robot learns to forge handwriting - expert graphology assessment (film, 24m)
In the latest video on the Stuff Made Here channel, the author explores the topic of forgery related to handwritten notes. He begins by recalling his experiences uncovering forgery in cards and then shares his idea of creating a robot that will generate indistinguishable cards. As the project progresses, the author reveals the complex thought process and technology he plans to employ. From using a pen to intricate machine learning algorithms, each step feels like a genius-level challenge, leaving viewers fascinated by his ideas.
His struggles with the writing robot are both frustrating and exhilarating. After failed attempts to create handwritten notes, he decides to utilize a ready-made drawing robot but quickly realizes the results are far from his expectations. Not only does the handwriting appear computer-generated, but his attempts to trick his wife into identifying the forgeries also end in failure. With each passing moment, while the project leans toward global forgery, it becomes evident that the authenticity of handwritten cards is a complex issue.
In the film, the author brings in his wife to see if she can distinguish genuine handwriting from that produced by the robot. Their interactions are humorous, displaying the contrast between what they consider 'forgery' and his clumsy attempts to navigate the process. Each version of the handwriting reveals differences that are immediately noticeable. These numerous failed attempts highlight that the authority of human handwriting is challenging to replicate, even with advanced technology at hand.
Not only does the robot's development unlock the understanding of handwritten writing, but the author also delves into the technical aspects of his project, explaining the concepts of machine learning that would eventually allow him to achieve realistic, indistinguishable output. This technological aspect of the film pulls viewers into the soul of contemporary creativity, reminding us of the complexity of interaction between humans and machines. Between coding and actual robotics, there is room for errors and mistakes, undoubtedly adding tragedy - but also humor - to the entire undertaking.
The juxtaposition of the project's development with the passion of a robot enthusiast and the statistics confirming its success serves as a fascinating conclusion. At the time of writing this article, the video has over 10.6 million views and more than 307 thousand likes. These numbers illustrate how the program captivates its audience, blending practice with science, fun with technological prowess. It is a great story of passion, frustrations, and chaotic attempts at innovation that only robots can turn into a concern of the twenty-first century.
Toggle timeline summary
-
The speaker discusses receiving letters with signatures that seem forged.
-
Reflects on sending handwritten cards and the difficulty of doing it by hand.
-
Created a robot to automate the handwriting process for the cards.
-
Sent samples of the forgeries to a forensic handwriting expert.
-
Expresses anxiety about the expert's judgment on the forgeries.
-
Shares a childhood story about writing lines as punishment.
-
Plans to build a robot that can write indistinguishably from human handwriting.
-
Mentions a new workshop setup allowing for more projects.
-
Demonstrates the robot's ability to write on paper.
-
Explains that generated handwriting needs to appear more human-like.
-
Conducts a test to see if his wife can identify forged handwriting.
-
Discusses problems with the robot-generated handwriting being too uniform.
-
Explains the methodology for improving handwriting generation by sampling his own.
-
Details the development of a prediction program to enhance handwriting authenticity.
-
Shows how the robot arm can manipulate cards in the handwriting process.
-
Demonstrates a new suction mechanism to handle cards.
-
Plans a new approach using machine learning for handwriting prediction.
-
Describes how the prediction mechanism will improve the realism of handwriting.
-
Reveals the successful outcome of using a pre-made handwriting model.
-
Announces intentions to send personalized postcards to patrons.
-
Decides to differentiate between robot-written and authentically handwritten cards.
-
Summarizes that while the handwriting is good, it is not perfect.
-
Prepares to start mass production of the postcards.
-
Promotes Onshape, a CAD platform used for design processes in the project.
Transcription
Have you ever gotten one of these letters with a signature on the bottom? So of course you hold it up to the light and you see the paper isn't indented. Then you pull out your loop to see if this thing is printed, but you can't tell. So of course you break out the microscope, and there it is. Toner. Who do they think they're going to fool with this? I've been thinking about this because I committed to sending out a ton of handwritten cards, which turned out to be really hard. One thing led to another, and I ended up building a robot to write the cards for me. That also turned out to be really hard, mostly because I'm not willing to just have it print out. If I'm going to commit fraud, we're doing it properly. We're talking cards that are indistinguishable from human writing, written by a robot with a pen, and a manufacturing cell to automate the entire process. This entire project came down to one question. How good are the forgeries? I spent a lot of time seeing if my wife could pick out the forgeries, but what I'm really excited about is I sent samples to a forensic handwriting expert. I've only ever seen these guys in movies, but they're real. The one I sent it to used to work for the Secret Service, and I'm terrified to see what he's going to say, because I think he's going to see right through me. Forging handwriting isn't a new idea for me. Back when I was a kid, my mouth would get me into a lot of trouble, and my dad would have me write lines. One time my dad gave me 100 lines, and I had a horrible attitude, and said, I don't care. So he said, alright, 1,000 lines. I was just like, whatever, I don't care. He said, okay, 10,000 lines. Long story short, that's the first time I tried to automate handwriting. I tried to carve the line I needed to write into a potato, and use that as a stamp, but it did not work. But I've been thinking this through, and maybe the reason I failed is I just didn't have the correct technology yet. Yeah, I'm not sure you would have fallen for that. The thing I have in mind should be a lot better than a potato. My plan is to have one robot that can move a pen anywhere you want to draw whatever you want. For it to draw the right things, we'll need a bunch of software to convert the text into handwriting. This is going to be the hard part. So I'm going to bring up the drawing robot, so we can start testing out the software. I was about to design and build a robot that does this, but I took a look on the internet, and it turns out you can buy a complete machine that does this for less than it would have cost me to get the parts. So we're going to do that. Maybe anything in there? You might have noticed that I haven't made anything in a little while, and a big part of that is there's been tons of stuff happening in my life. But equally important, I actually haven't had a shop until now. This is actually my sixth workshop as an adult, but I finally have a long-term lease, and the only way I'm leaving here is if I go bankrupt. And then most importantly of all, there's tons of room for activities, tools, piles of junk, all the important stuff. I can't wait to pack this full of stuff that I should have thrown out 10 years ago. So this should be the handwriting robot. Writing a robot is so much easier than building it. I should do this more often. I think that's it. You just put some paper in here, and a pen in here, and it'll draw whatever you want. This is so cool, but way too precise. We need it to write like a human. The easiest way to generate handwriting is to find some font that's handwriting and send that to the robot. It writes a little bit differently than a human. Yeah, this definitely isn't going to be fooling anyone. Since I made these cards, I'll always be able to tell which one is written by the robot, even if it's good. So what we're going to do is have my wife see if she can pick out the imposter from a lineup of genuine handwriting. This one is extremely obvious, so it's really just a test to make sure my wife isn't defective. How are you feeling? You feeling ready? I'm ready. Feeling good? Hit me with it. Is your engine started? It's roaring. Is it in diesel or unleaded? Leaded. Well, this one is obviously fake. Congratulations. You did something really easy. Thanks. Why is it so obviously fake? Every letter looks the same. Every S is squished up on the bottom. It's totally straight across. It just looks like a font. Failure. You better get back to work on that machine. For the next attempt, we're going to record my handwriting. We're going to write every letter a bunch of times, and then write a program that takes these letters and types them out kind of like a font. But it'll choose a different letter every time and vary the spacing and straightness to make it look more natural. It's actually not that bad. Let's see what my wife thinks. They're all from Shane. Is that what you named the robot so you can feel good about yourself and sleep at night? They're obviously real. Are you trying to write badly just to trick me? No. I think this is the fake one. But why? Why? Why? Some of it's weirdly far apart. Important. And none of them are connected at all, which happens a lot. And this D on the postcard. It's like, postcard. I know how it was made. The letters are pasted together. To me, that's how it looks. The main issue seems to be letter spacing and drawing them in a way that makes sense. I'm going to sit down and write every combination of two letters. This is going to give my program a concrete example of how any letter flows into any other letter. So if I want to write a T after this A, I can just look at my example and use that T, and it should make sense. If you're wondering if this is more work than just writing out the cards, we don't talk about that around here. I really like this technique, but it does have a couple problems. Let's say I want to write the word cat. I have a reference on how to draw C-A and A-T. But I have two A's now, so which one do I use? I couldn't find a way to blend them together, so I just flip a coin. Definitely not great, but it's a little better. What's the verdict? Is this the fake one? I'm asking the questions here. Am I right? Yes. Why, if you are correct. We're going to save some time here and just say that it looks fake for the exact same reasons as the last card. Do you know what this whole exercise reminds me of? I'm afraid to ask. Why? I don't know. Have you ever heard that you can't get to the moon by climbing successively taller trees? No. We need to stick the monkey in a rocket if we want to get to the moon. Do you get what I'm getting at? Am I the monkey? No. We obviously need a different software approach, but I'm tired of software. Let's make the robot work. We have the pen plotter that will do all the handwriting for me. But if I want to make a ton of cards, I have to sit here and feed them in and out, which is terrible. Instead, what we're going to do is replace my arm with a robot arm, which is happy to wait for the plotter. It'll work 24-7, 365, for $0 an hour, and it'll like it. You might recognize this arm from a previous project. It's a Tormach ZA-6. It's a robot that can move and rotate in every direction, which is perfect for what I need it to do. What I want to be able to do is take a stack of cards and stick them in the machine. And this robot will grab them one at a time, put them into the plotter, wait for them to be written, and then take them and organize them someplace else for me to mail. Meanwhile, I'm someplace else doing something important. At the moment, the robot has this little red nub, which cannot pick up or move cards. I do have this little sort of gripper hand thingy. But imagine trying to get this gripper under one card without moving the whole stack. And even if you do that, good luck putting it down where you want it to go. Since the card is big and flat, we can grab it with the power of suction. But you can see that it takes a while to turn off, which is annoying. So I came up with this design, which is kind of like an octopus tentacle. It pulls air through these suction cups to firmly grasp it. At least in theory. Let's see if it works. I'm using the same vacuum generator that I used on my puzzle robot to generate the suction. These are really cool. The main benefit is I can turn it on and off almost instantly. Very cool. On the first try, too. That never happens. It can pick up one card at a time and place it right where you want. The next problem is that if the robot just sets the card in here, there's nothing holding it in place. And the pen is going to slide it all over the place. I don't know if you can tell what it was trying to draw, but not that. For all the cards I've written so far, I've held them down with little magnets. There's no way that the robot is going to pick up and put down little magnets. So I made this holy plate. It attaches to a shop vac, which would suck the card right down onto the table. If for some reason you want to make this robot, all the design files are available for free. I made them in Onshape, and there's a link in the description where you can sign up and download them. Now the robot can stick the card down in here. It can slide all over. But if we turn the vacuum on, it's not going anywhere. Totally stuck. But then when you turn the vacuum off, it's free to leave. It's no longer being detained. The last challenge here is actually kind of subtle. I've got a big stack of cards that gets shorter as the robot uses them. And the robot would have to compensate for this by going further and further down. We could put the cards on a motorized platform so they're always at the same height. But that would definitely be over-engineered. So what I'm going to do is push the stack of cards against a fixed surface with a spring. This will put the top card always at the same height. But because the cards are flexible, if they're only held back by their very edges, we should be able to grab them in the middle and the card will bend and reliably let only one out. Let's see if it works. This also works in reverse to stack the cards when they're finished. Yes! This is so cool. And it was surprisingly easy to get working. At least the robot part. There's just one more thing that it needs. It's kind of amazing. These big beady eyes make me feel kind of guilty. You know, having to work 24 hours a day for $0 an hour. I still love you. All of our software so far has told the computer explicitly how to generate each letter. With complicated schemes to try to make it look natural. But they don't. What if instead we don't think about drawing individual letters? Imagine that I'm writing something and I stop here. Even though you don't know what I'm writing, based on the shape of what has been written, you know the next place the pen is most likely to go is somewhere around here. We're going to make a program that does this. Look at the shape of what's been written and predict where the pen will go next. And then if we pretend the pen actually went there, we could feed this back into the program, which will predict the next place the pen will go. And on and on and on. Although the way I've described it can't work. All these predictions are based on the shape of what's been written. It has no idea what I'm trying to write. The partially written word we started with could plausibly turn into a lot of different stuff. So we're going to add a second predictor program. This program will also look at the shape of what's been written, except it's going to try to predict which letter it thinks we're currently writing. And then the first program will see this and only predict moves that would result in that letter. Now if we put it all together and start a new word, the letter predictor thinks we're drawing a B, and the pen predictor says that would start about here. It'll continue like this until we get to the end of the B, where the letter predictor will say we're at the edge of a B and an A. The pen predictor might lift up the pen and move to start the A, or it could decide to connect them, which is something you'll never get from pasting individual letters. These predictors seem like magic, and they kind of are, but I'm going to do my best to explain them. You can think of these predictors as an incredibly complex instrument with a ton of knobs. When you ask it to predict the next thing to draw, each of these knobs will tweak the prediction in some way. Our goal is to get them turned just right so they predict handwriting that looks real, which is not what happens if these knobs are set randomly. In that case, you're going to get total garbage. But if I have an actual example of what the handwriting should look like, we can calculate exactly how garbage this result is. Call it garbageosity. Now if I turn one of these knobs just a little bit, we can see how it changes the output, and if it made our garbageosity better or worse. Now we know which way to turn this knob to make things better. So we can remember that, and reset the knob, and do this for every knob. We have to do each knob separately, because if you turn two knobs at the same time, you don't know which knob did what. After we do this for all the knobs, we're going to take each knob and turn it just a little bit in the direction that will improve things. So if we run the predictor again, it'll still look like garbage, but slightly better garbage. If we repeat this experiment with a ton of handwriting samples, it'll get a little bit better with every example, and we'll eventually converge on a predictor with the knobs turned as good as we're going to get. If everything worked right, its predictions will be close to the examples. But amazingly, if we give it words that weren't in the examples, it should be able to draw those too. If you give the predictor enough knobs of the right types, it will pick up on an enormous amount of detail of what's required to generate handwriting, without you ever telling it what handwriting is. You can basically say the computer learned to write, which is why this is called machine learning. Although my description is very rough. I glossed over the math, and I simplified a lot of stuff. I also did not come up with this technique. Everything I've said is based on a famous paper written by Alex Graves. I've been struggling to even implement it. At this point I've got some code, but I need examples of handwriting to train it with. I made this program which gives me lines to write. It's like old times. And it records all the strokes for everything I write. And after some good quality time, we've got some data to train our predictor with. Now we run the training process. Which is very slow. The training is finally finished. Let's see what this thing can do. Well, that's a letdown. So there's just a really dumb mistake. Hopefully it'll work this time. But we have to train it again. Here we go again. Why? Oh. Duh. Not a great problem to iterate on. Alright. If this thing had a body, I would attack it. I just don't understand. Oh. Alright, this one's looking good. Yes! The main problem here is me. I don't really know what I'm doing. I did this project to try to get better at machine learning. And to some degree I have. But I'm in way over my head. And I think it's time to do the pragmatic thing. And see if we can find some code online that does what we want. Of course there's an open source repository that does exactly what I want. Except written 10,000 times better. It even has a web demo? You gotta be kidding me. It does look great. I know in my brain that I'm just running someone else's code. But man, does it feel good to finally see some handwriting that isn't nonsense. This was written by Sean Vasquez. I'll link to it in the description. And thank you, Sean, for saving me a ton of pain. Sometimes you just need a pro. The path we took to making it work doesn't really matter. As long as it works. And it does. It doesn't really matter as long as it works. And it does. I think. It's a million times better than the other handwriting. It's got that human touch. It's really good. Wow. There's no way my wife can tell if this is fake. When you know that exactly one of the cards is a forgery, we pretty much just choose the neatest card, because that's kind of how computers tend to write. So in this experiment, between zero and four of the cards are forgeries, it's up to you to figure it out. Good luck. We're all counting on you. Yeah. I mean, these all could be real handwriting, I feel like. But they all feel equally real or fake. They all feel equally real or fake? Like, if one is real, they're all real. If one is fake, they're all fake. I think they're all fake. Lucky guess. I knew. I knew that she would know that I would do all of them fake. So then I thought I'd do all of them real. But then I thought maybe she'll know that I would think that. I just want you to be impressed. With your plumage? With some other guy's code. Some other guy's plumage? I don't know if I want to say that. I think these look great. I would be happy to have a machine pump out thousands of these. I haven't actually explained what all these cards are for. Basically, there's a bunch of people who help support these projects on Patreon, and I thought it would be cool to send out something as a way of saying thank you, ideally something unique and part of a project. And that's how I ended up making this entire thing. So if you're a patron, thank you. And you should be getting a card soon. The only thing left to do is to generate all of the postcards that the robot needs to write. And it has a spreadsheet with everyone's information, and it goes through that and combines the info with a template to get the personalized heartfelt message for every single person. And when you do look at it this way, it kind of loses some of its charm. But I did have an idea that I think might salvage some of the charm. Let's see if I can find it. If you look at this little tiny hand on the robot, I'm now technically correct when I say these are handwritten, which is the best kind of correct. All joking aside, though, I don't think it's okay to present robot-written postcards as if they are written by me. So I'm going to have to make that clear. But you know what? I think a robot-made postcard is cooler than a postcard written by some guy on the Internet. A couple of weeks ago, I sent samples of robot handwriting to a forensic handwriting expert, and the results are in. I just got off the phone with Ron Morris. He's the handwriting expert, and what a fascinating guy. He's done handwriting work with the D.C. police, the Secret Service, and the Treasury Department. He also wrote the book on it, at least one of them. We actually spent hours talking about it, and I'm really tempted to make another video just going into the details of how this works. But for this project right now, there's really only one question that matters. So how good is the handwriting? Wow, that is not what I was expecting you to say. But as we talked about it more, it became clear that there might be some ways you could tell that the cards were written by a robot. The cards have distinctive characteristics that are shared across writing styles. So if this was used in some kind of large-scale forgery ring, you would probably be able to come up with some kind of profile that would allow you to determine if something was written by the robot. My overall takeaway from all this is that the cards are pretty good, but not perfect. Hypothetically, I would be afraid of committing a crime using this technology. I think Ron would find a way to get me convicted. Oh yeah, and one other thing. Ron is retired, so don't send him your handwriting samples. You're just going to make a bunch of work for him and make him hate me. Please don't do that. All right, so clearly if we want to fool the pros, we've got our work cut out for us. But I think this is good enough for now, and it's about time to hit that button and start the mass production process. But before I do that, I want to ask you for a favor. I'm about to tell you about the video sponsor. If you would just take a second to consider if it's something you might be interested in, it really helps me out. It's your support that makes these videos possible, and I'm very grateful for it. I basically have my dream job building stuff of dubious utility, which is amazing, so thank you. And I also think you'll be interested in this video sponsor. It's a legitimately useful tool that I use, and it's called Onshape. Onshape is a CAD platform, and CAD is what I use to design every part for everything I make before I make it. It's also a little bit different than some of the CAD tools you might have used before because it was built from the ground up to run in a web browser. I didn't think that would work, but it works, and it allows us to do some really useful things. You can have multiple people working on the same design at the same time, kind of like Google Docs. I used to work at a company called Formlabs designing 3D printers, and we would actually sit down in Onshape with a group of engineers and work on one shared design to figure out product architecture. It really feels like the future. This also completely eliminates file management. Everyone has access to all the designs with all their history on any device immediately. I can be out in the shop with my phone and open up a design to check stuff. This is also what enables me to share the designs for this project with you really easily. And then one other really cool thing is they've opened up the programming language that Onshape has written in. So if you need to do something unusual, you can build an entirely new feature in Onshape to do that thing. Modeling dog bone pockets for CNC router joints has always been a pain for me, and I made a feature to do that automatically, and now it's not a pain. It's great. And although Onshape is a serious tool, it's designed for business use, it's also free for hobby use. So if you're a business and you want to try out a new CAD platform, or you're a hobbyist and you want to try out a new 3D modeler, check out Onshape. You can sign up for free. All you have to do is go to onshape.pro slash stuffmadehere, and that's it. Thank you for taking the time to check out this video's sponsor, and thank you, Onshape, for sponsoring this video. I love working. It's the best. Thanks again to everyone who supports these videos on Patreon. I still find it hard to believe that people like this stuff enough to do that. I also hope this robot works, because if it doesn't, I'm in a lot of trouble.