 Hello, everyone. Yeah, I'm Otilia. By day, I work in cybersecurity. By night, I knit, which probably sounds a lot dorkier than it is. Anyway, I've always thought it would be quite fun to combine my love for computers or my hatred for computers with my love for knitting. I've done talks before on how knitting is like coding and how yarn is a programmable material and always wanted to sort of knit something stupid that would trick computers in some way or another. And I thought, what about a jumper that would trick facial detection? Yeah. It's not going to be a sock to put over CCTV cameras. Lots of people have asked me if that was the case, which makes me think maybe that is a business. Anyway, it's about making a jumper. So there's a couple of things that we're going to have to learn before we go into how to make the jumper. This is a talk on knitting. It's going to be a lot less sexy and cool than you probably thought it was based on the title. This is a knitting talk. I'm sorry. I'm going to try to keep it quite light on tech jargon, both in terms of algorithms and in terms of knitting. I'm sure all of our brains are sort of mush after listening to the glows of amazing talks and looking at like fire and lasers. So I'll try to be sort of kind of light and easy. So, yeah. So let's start about what is knitting. So how many people here have knitted before? A lot of people. I'm impressed. But yeah. So for knitting, it's basically the act of making fabric out of yarn in the knitting needles. Important here. This is not using a hook. That's called crocheting and it's a different thing. It's also like fun. But this is what we're talking about today. When you have knitting needles, you can either use two knitting needles like the first illustration you can see, or you can use five, which basically allows you to make tubes. So when you have two knitting needles, you're basically going like back and forth, back and forth. If you knit in a tube, you can just kind of do like imagine like a spiral. For the sort of concept of knitting, the basic unit is called a stitch. And there are two types of stitches. So you have a knit and a purl. So if you're wearing like a knitted jumper today, if you look at the sleeve, it might have like a stretchy rib. So if it kind of looks like a little V, then that's a knit. And if it has like a little squiggle, then it's a purl. So to begin with, those two and the ability to increase and decrease stitches on the needles, you can basically transform wool into, you know, a T-cozy, a jumper, whatever you want really. And you can make sort of different textures. So you can make like a stretchy rib. You can make cable knitting and all kinds of like cool textures. So knitting patterns. So this is the way that knitters communicate. And this is how you sort of document a knitted project. So knitting patterns, as I sort of briefly mentioned, are kind of like algorithms. You have a set of instructions that you follow. They're very acronym heavy. They use loads of repetitive components. You have if statements and for loops. And you use loads of maths. Thankfully, it's kind of easy maths. You're doing, you know, you're counting, you're subtracting, dividing, multiplying, all those kind of things. So you see here, the knitting pattern basically tells you the written instructions. And the image is what this instruction actually like turns out to be. So this is basically just telling you to repeat a bunch of knit and a bunch of pearls. And then you kind of reverse that to make a sort of checkered pattern. This is a bit of a random subsection of this talk. Mainly because I just want to tell everyone about this. And it's really interesting. Knitting actually has a kind of history about being used for surveillance. And I think that's really cool. Especially because I'm talking about anti-civilines. Knitted patterns and knitted items have been used in the past to basically transmit information across borders during wartime. There's loads of different ways that you can basically do a steganography with knitted items. So you could either kind of tie knots into the yarn itself. Or you can sort of knit in basically like Morse code, for instance. So say that a knit stitch is like a dot and a pearl is a dash, right? And then you're knitting some socks or something. It's actually used by the Belgian resistance movement in the Second World War. They recruited women with windows that overlooked railway stations to basically do surveillance for them. So they were keeping track of the comings and goings of the enemy forces and embedded this into their knitting. And then they went along and gave someone a pair of socks that then could be deciphered and they could know what the enemy forces were up to. And it was actually such a big problem that this like sending knitting patterns was banned in Britain during the Second World War just in case they could date secret codes. So this is a cutting from a newspaper from the 9th of January 1940. And I'll just read it out for you. So he says, knitting spice. Parts may not be sent to sensible countries by private persons. They must be sent by the makers of the contents and must never leave the shop until they're mailed. Reasons given for this is that enemy agents used hand-knitted garments to convey via neutral countries vital military and naval intelligence by means of cunningly worked codes knitted into the material during the last war. And that's crazy. I didn't know that until I started looking into this. And I think that's not like a super commonly known thing. But these days you don't really have to worry about someone watching you from their window and knitting things into their socks. They're not giving that to someone who's wanting to surveil you. Because we have modern surveillance. We have CCTV everywhere. So it's fine. So I'm going to talk a lot about facial detection. Because facial detection is step one of facial recognition. If you want to be able to recognise a face, you first have to be able to detect that there is a face to begin with. So there's loads of different ways that you can detect a face. You have neural networks which are probably the most common thing that people use these days. They're super fast. Really amazing. But they're really expensive to implement because they use quite a lot of memory. And yeah, they're not really applicable in all sort of technological situations. You then have the Viola Jones framework. And this is a framework that was created in 2001 by two people called Paul Viola and Michael Jones. And this is still used today even though it's 21 years old. Because it's really, really fast. So you can use it in handheld devices. So it was traditionally used in a phone camera where you wanted to detect a face so you could focus on it. Or draw a little square around where you think there's a face. So I'll very briefly talk about how this works. So the Viola Jones framework basically takes whatever input they get and it turns it into a black and white image. It then tries to match human face properties with a thing called heart features. Which basically uses the dark and the light areas of faces and match them to a face property like an eye or whatever. So if you look here, this is like an example of heart detection. So it's basically sort of calculating on like rectangular regions of the location of the windows. So it does a bunch of math. I'm not going to go into it. But it basically sums up the pixel intensities in the different regions and sort of calculates the difference between the sums. If you look for instance with a nose, like if you have a nose, you'll have like a dark area, a light area and then a dark area again. So that's like a good indication that this is probably a face. So now we have all the sort of lore and the technical information where it doesn't even start to, you know, make a jumper. So I came across a project called hyperface a couple of years ago with basically it was like a prototype where a guy called Adam Harvey made a false face computer vision camouflage pattern. And this was basically created to be that ideal representation of a human face. And I was thinking you could probably knit that. I don't think anyone else has. I don't know why anyone would. But I was kind of looking and it didn't seem like anyone had. So I was like, yeah, I'll try it. But before you can start actually just knitting something, you kind of, especially like an image, you kind of have to go through quite a lot of steps to make it knitable. So I started out with editing the image to be completely black and white. So this is the original pattern. I'm not entirely sure if you can see it on the screens. But it's obviously black and white, but it also has like some gray scale. And I didn't want to add that because that's going to make it a lot harder. So I made it completely black and white. And I sort of scaled it down and pixelated it. So all the pixels were the same size. And then sort of did some editing just to make it sort of seem a bit more reasonable. I didn't have to calculate how many stitches one side of the jumper would be. Because it's basically two repeats of this pattern. So this is one section and then obviously the back is another section. So I ran it through some software to make it knitable, which basically makes it into like a grid. And also kind of slightly changes the width and the length of the pixels because like a knitted stitch isn't like a perfect pixel. They're kind of like slightly longer and wider. So, yeah, as I said, this is the original pattern. This is what I started out with. And this is the grid that I kind of ended up with once I really boiled it down. And because I was doing some of the edits to this, I was quite worried, like, is it still going to show off us like a face? So I continuously was testing it with a tool called OpenCV, which is basically an open source library used for computer revision. And I was running it with a profile called Harkis Games just to check that it was matching the intended profile. And then I had to start knitting it. So this was never made to be knitted. Proper knitting patterns have like really small repetitive patterns, like the sort of color work, so you can sort of memorize it as you go along. This pattern might look vaguely repetitive, but it has variations in each and single one of them. And you basically can't look away from the paper whilst you're knitting. So I was continuously staring down into this bit of paper, sort of manically drawing lines where I was, because if you lost track, there was a lot of counting and a lot of redoing, which I had to do quite a few times. I started making this project in lockdown early last year, Scotland had a lockdown. And I thought, this will be a fun thing. I'll make a tweet about it or something. And then I kind of stopped, because I was like, this is terrible. I hate this. This is awful. And then EMF came along and I saw they were looking for talks. And I was like, this kind of sounds like people would be into. So I submitted it and it got accepted. So then I had to start knitting really, really fast. So this only really finished like a couple of weeks ago. I was still doing the slides in the car down. But just briefly on the anatomy of a jumper, it's basically just like a series of tubes. This is like, the body is one large tube that I used a method called sticking, which you basically sort of sew it and then cut it. And you use it quite a lot in that kind of old traditional types of colour work, like fair isle or like traditional low region patterns. So I thought that was probably a good idea. As I said, the pattern repeats twice. Once at the front, once at the back. And then I sewed together the shoulders and knitted like a little collar. I realised for the sleeve, it was probably kind of pointless to make it into like a proper pattern because like your arms aren't really like flat enough to kind of show up and sort of represent like an entire face. So I thought I'd just like randomly make it up as I went along just to kind of match it. So here you can see the body without the sleeves. Also sort of testing it. This is basically a big tube that's been sewed together and cut apart. This is the insides of the jumper. And I think I'm just really fascinated by the insides of jumpers because if you're doing colour work, you're basically continuously bringing the yarn with you. So even though there's like huge bits of white, I still have to bring the black with me just in case there's like a random pixel that needs to be, you know, knitted. So it's pretty tedious work. And you have to kind of continuously weave them in so you don't like strangle yourself when you put it on. So now, does it work? Yeah, so this is a really awkward video of me rotating. But yes, it does kind of work. So all of the green squares is where it thinks that there's a face. So thankfully, it identifies my face as a face. That's nice. But most importantly, I think there's loads of faces on the jumper. There are some like random kind of false positives where I think my ear is like a face for a second or so. But as you can see, it really like continuously do think that there's just a bunch of faces on my body. So here you can see just in the image form, the green squares indicate that there's potential face. If I wear a face mask, it doesn't recognize my face at all, because I'm being attacked by spiders. But yeah, it kind of works. So it works in the intended algorithms. There is a bot. It works on the intended algorithms, right? So as I said, I tested it with OpenCV using the Harkis gate profile. And also tested it with a tool called vFrame using the hard attack profile. vFrame is actually a tool created by Adam Harvey, who created the original hyperface project, which is like a tool for like OSINT work. I emailed Adam Harvey to tell me about this project, because I thought he would probably find it quite funny. And he's just said make sure that you point out that these, you know, algorithms are defecated now, like especially in OpenCV, they don't use it anymore. But as I said, it is still used in like other places. Just because I started getting sort of obsessed with like testing this out. Spiders. I just started going through like weird face apps and see what would happen. So I started downloading a bunch of like terrifying apps. I'm just supposedly sort of mad botnet. But here, who's an app? Yeah, so this is like an awful terrifying app. It like will like edit your face and like give you, well, yeah, it's like super creepy, I hate it. But yeah, he thought my little pretend face just looked like sand. So he gave it like a beautiful perfect smile. And yeah, I just every time I go through this talk, almost like this image is getting imprinted into my brain, like, this is just going to be like the fuel for my nightmares for like the rest of my life. So yeah, super quick talk. I rattle through this. But conclusions. So I knitted this. So no one else has to. I thought it was a fun idea. And I thought no one else has done it. So I might as well try it. I will post the pattern on my Twitter if for some awful reason you want to try this yourself. But like I highly recommend that you don't. And sort of also in like a final conclusion is, is this going to stop you from being surveilled? No, no, it's not. You might get some confused look because you basically walk about looking like an ASOS bag, which I realized very late on in the project when I ordered something from ASOS. Now it's like that. But there we are. But yeah, no, I mean, it's not going to stop you from being surveilled. Of course it's not. I mean, what is. But, you know, it was a fun project. I learned loads. And at least now someone has done it. So that's it. Thank you so much.