Suramya's Blog : Welcome to my crazy life…

April 30, 2021

Review and test of Fawkes: Software to protect your pictures from AI/Reverse searches.

Filed under: Computer Software,My Thoughts,Tech Related — Suramya @ 11:28 PM

Yesterday, I wrote about Fawkes & Photo Ninja which can be used to protect your photos from facial recognition models and reverse image searches. This is a very interesting field and I had mentioned about creating a service that does it for free instead of charging like what Photo Ninja is doing.

The first step to that is to check if the program (Fawkes) actually works the way it is supposed to, so I downloaded a pic from the internet (my profile pic on Twitter) and ran it through Fawkes. The program takes a while to run (~20 seconds per image) depending on the no of people in the photo. It detected the faces very reliably and modified the image. When using the default settings the output is saved as a PNG file but you can override it using a command line parameter. It requires you to provide the directory you want to run it against but if you don’t pass it the directory, it doesn’t give any errors. It took me a few mins to figure out what the issue was (yes, I know… My brain is tired). The command to run it in the current directory with debug (because I like seeing what the software is doing) is:

./protection --debug --directory .

I then took the resultant, file and searched for it via Google Images, Yandex and TinEye. None of them were able to find any results with the new image. So that part of the software works great. 🙂 Now coming to how the software modifies the image, I saw that it adds 2 rows of pixelisation to the image. First is near the hairline and cuts across the hair and forehead, and the second is near the chin and is about 5-10 pixels wide. It is clearly visible in larger photos, but when zoomed out it doesn’t look too jarring. Frankly it looks like the image got damaged and is kind of obvious when you look at it.

In my very basic tests it made the same change everytime so I have a feeling that we can train image recognition software to look for this modification and ignore it. It might be more powerful to put the modifications at random locations in the image (over the faces) that way it is harder to train the software to counter it. Plus if the visual noise section can be reduced it would be great. Maybe instead of a long blur that is noticeable we can try to do multiple small changes that change the pic without making it obvious that the image was modified.

Below are the two images, the original on the left and the modified version on the right.

Sample output of the Fawkes

I then looked at running this on my webserver, but due to the restrictions there I wasn’t able to get it to run. Although, to be honest I only tried for about 20-30 mins because I was tired. If I can’t get it to run on the server then the other option is that I run it on my home computer but I will need to look at that in more detail before I commit to making this site. I have a rough draft of the requirements and feature list but still looking at the options before I start working on it. It will be a good way to take my mind of what is going on in the world so that is good.

Well this is all for now. Will keep you posted on how this project goes.

– Suramya

April 29, 2021

Using Photo Ninja to shield users’ photos from reverse image searches and facial recognition AI

Filed under: Interesting Sites,My Thoughts — Suramya @ 1:15 AM

Last year I had posted about the Fawkes project that allowed users to modify their photos to avoid them from being used to power facial recognition and image recognition technologies. But the problem with these technologies is that it requires you to setup a server/run it on your machine which is hard for regular folks to do and that reduces the usage of the tool, even though it is very useful.

Now, a company called DoNotPay is launching a new service called Photo Ninja that allows you to upload a photo you want to shield and the software adds a layer of pixel-level changes that are barely noticeable to humans, but dramatically alter the image in the eyes of roving machines making it harder for someone to perform a reverse search on and to use for training AI models.

This is a great start and makes it really easy for people to use the service which costs $36 a year.

“Photo Ninja uses a novel series of steganography, detection perturbation, visible overlay, and several other AI-based enhancement processes to shield your images from reverse image searches without compromising the look of your photo,” says the company.

AI systems are trained to analyze pictures by looking at the pixel-level data, and adversarial examples can trick them by changing the pixel colors in a subtle enough way that the human eye doesn’t notice anything different but a computer fails to categorize the image as it usually would or interprets it as a wholly different image.

Anti-creep software — There are various reasons why you might want to use Photo Ninja. Before joining a dating service like Bumble, you could run your pictures through Photo Ninja so that weirdos can’t upload them to Google’s reverse image search and find your social media profiles without getting your consent, for instance.

I wonder if there is a demand for a similar service that could be powered with Fawkes and be provided for free to all users. I am thinking about setting something up like a Bot or a site that does this for free. I think there is a market for it and it would be a great side project for me to work on during this lockdown.

What do you think?

– Suramya

April 24, 2021

Get Vaccinated & Ignore the Anti-vax nonsense! Every Indian 18+ is eligible for vaccine starting May 1st.

Filed under: My Thoughts — Suramya @ 3:46 AM

On May 1st all adults in India are eligible for getting vaccinated against Covid-19. Unfortunately, I have heard a few folks repeating the standard Anti-vaxer nonsense about how the vaccine is not safe and we don’t know the long term results of the injection. This is from educated folks who I thought would know better. Then there were some folks who were waiting to see what happens before getting vaccinated. I usually end up scolding all of them about vaccines. In India we have given 13,56,67,949 vaccine doses as of now, how many more do you need to see before you are willing to take the vaccine?

Another fact people keep bringing up is that people have gotten Covid even after getting the second shot. There was a study done to look at the numbers of infections after the second vaccine shot and as per the research, only .04 (.03 if you got Covishield) of the people were infected after the second shot and even in those folks the infection was not as deadly as it is in folks who didn’t get a shot. Compare this with the infection rate without the vaccine: As of today Positivity rate over 15% (15.9% in Karnataka) in 146 districts, 5-15% in 274 others. Please look at the numbers, we can’t handle the increasing numbers and you have seen the situation in the hospitals where people are frantically looking for ICU beds and oxygen tanks.

Covid infection numbers after second vaccination

It’s easy to blame the government for not doing enough to control the pandemic but I must ask you, are you doing enough to control it? The basic measure is to wear your mask when out side. This means that the mask should cover your nose and mouth fully. Having a mask over your chin does not stop the spread of Corona, it just makes you look like an idiot.

Also, there is no 5G tracking chip in the vaccine. The government/Bill Gates/Whoever does not need to inject you with a chip to track you, they can very easily (and much more cheaply) track you using your phone or using the multiple camera’s out there everywhere. The image below came up in my feed a little while ago, it claims that the item shown is a 5G tracking antenna which was injected into their niece when they got vaccinated. This claim is ridiculous at so many level but lets take a walk down logic lane and do some calculations to show how stupid this is. The length of this ‘chip’ is about the same as the width of the finger in the photo, a quick search gives us the average thickness of a human finger as 1.6 to 2 cm. Now lets try to get the thickness of the ‘chip’. Using GIMP I see that the ‘chip’ is ~168 pixels long and ~35 pixels wide at its thickest point. A quick calculation allows us to convert this pixel thickness to cm: 1.6/168 * 35 = .33 cm (3.3 mm). To give you an idea of how thick that is, check out this 3mm thick ring that is available for sale on Amazon.

So, coming back to the injection. In order for someone to inject you with a 3mm thick chip/antenna, the needle has to be atleast 3.5mm thick (maybe more because this is just rough calculations). As per the CDC guidelines the needle used for Covid injections should be 21 gauge for Pfizer and for Covaxin a 23 – 25 gauge needle should be used. Looking up the gauge scale on Wikipedia we see that this translates to 0.8192mm (21 Gauge) – 0.5144mm (23 gauge) – 0.6414mm (25 Gauge) of thickness. Now please explain to me how we can fit 3.3mm thick antenna into a needle that is less than a millimeter thick.

Please use your brains when looking at these forwards because most of them don’t make sense. You just need to look at them logically.

To close the post, I would like to say that the best way to stop the spread is to get vaccinated. While that is going on, we need to continue wearing masks and social distance because that is the only way to control the disease. I don’t know about you but I am tired of not being able to meet friends and going out for a few drinks or just watching a movie in the theater.

Let’s work together to end this pandemic.

– Suramya

April 20, 2021

Converting old tires into graphene to reinforce concrete

Filed under: Emerging Tech — Suramya @ 7:42 PM

Waste tires are are a major pain to recycle and usually end up in landfills or being burned for fuel/heat. They are especially popular with the poor because they take a while to burn and thus give heat for a longer duration. Unfortunately, the process is also very polluting and the smoke from these fires is especially bad for the environment (and for the folks breathing it in). However, there are not many uses for these tires at scale that are not more polluting, but that changes now. Thanks to research by Rice researchers, we now have a way to convert waste rubber into turbostratic graphene, which can be employed to strengthen concrete.

Most conventional production processes for graphene are time-consuming, solvent-intensive, and energetically demanding. To circumvent these limitations for mass production, flash Joule heating (FJH) has been shown to be an effective method to synthesize graphene. Here, methods for optimizing production of graphene from rubber waste feedstocks are shown. Through careful control of system parameters, such as pulse voltage and pulse time, turbostratic flash graphene (tFG) can be produced from rubber waste. It is characterized by Raman spectroscopy, X-ray diffraction and thermogravimetric analysis. The resulting tFG can be easily exfoliated and dispersed into various solvents because of its turbostratic arrangement. Addition of tFG into Portland cement results in a significant increase in the compressive strength of the composite. From a materials perspective, FJH offers a facile and inexpensive method for producing high quality tFG from rubber waste materials, which would otherwise be disposed of in landfills or burned for fuel. FJH allows for upcycling of low-value rubber waste into high-value carbon nanomaterials for use as reinforcing additives.

The researchers estimate that the conversion process’s electricity would cost about $100 per ton of starting carbon. It is great that more people are focusing on alternate uses / conversion of these ‘unusable’ items to more useable stuff.

More details are available here: Flash graphene from rubber waste

– Suramya

April 9, 2021

How do stereotypes form and how you can avoid them?

Filed under: My Thoughts — Suramya @ 11:59 PM

Stereotypes are basically over generalized beliefs about a particular group or class of people. By stereotyping we infer that a person belonging to a particular group has all the characteristics all members of that group are supposed to have. Evolutionally stereotypes help us respond to situations faster because we have encountered a similar situation before.

These stereotypes in turn lead to social categorization because we have a tendency to group things together. This creates the us-vs-them mentality and creates in-groups and out-groups which in turn lead to prejudice. Basically that group members of an in-group will seek to find negative aspects of an out-group, thus enhancing their self-image and bond within the group because then the group members will be less likely to leave the group as they are prejudiced against the other groups. Prejudiced views can and do result in racism which in its extreme forms may result in genocide. This happened in Germany with the Jews and in Rwanda between the Hutus and Tutsis. There are countless more such examples.

Stereotypes are created when we listen to the people around us. Our friends, relatives co-workers etc would talk about people in a certain way or we see movies, read stories that depict people in a particular way and slowly we internalize that outlook without realizing it. For example, Chinese and Indians are supposed to be really good at math and during my freshman year in college, my advisor put me in Honors math course on his own because as per him “You are Indian so you should be good at math.” Personally I really dislike math so I hated that course. This is a minor example, but there are extreme cases where these stereotypes cause real harm, for example the stereotypical African American is supposed to be lazy, rude and in a gang, so people from these communities don’t get the opportunities that other communities get because it is expected that a majority of the folks in that community would join a gang. Over time this becomes a self fulfilling prophecy as kids join gangs because they don’t have other options.

There are so many examples of stereo types and how they harm the communities that entire books have been written on the subject. All I want to say is that people should be judged on their own merits and not on how they look like.

The best way to reduce stereotypes is to expose folks to other cultures and people without diluting them. Travel is a great way of achieving this and I can personally vouch for it as I have met folks from across the world during my trips and nothing beats meeting someone from another part of the world and realizing that they are just like you and have similar wants and needs.

– Suramya

April 8, 2021

Moving a Windows install to another drive on the same computer shouldn’t be this hard

Filed under: Computer Software,Linux/Unix Related,My Thoughts,Tech Related — Suramya @ 11:27 PM

I recently bought a new SSD drive for my Laptop because even after upgrading everything else (except the CPU) the system was still slow and looking at the process use I could see that it was waiting for disk read/write for the most part and that was causing the slowness. Once I got the new drive, I had to move the existing OS installs from the old disk to the new one. I have three operating systems (OS) on the disk: Windows, Debian and Kali. I need the windows OS for my classes (my proctored exams have to be taken on a windows machine) and others are for my tinkering and general use computing. The disk layout on the old drive was as follows:

root@Wyrm:~# fdisk -l
Disk /dev/sda: 931.51 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: ST1000LM024 HN-M
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x0f04ad34

Device     Boot     Start       End   Sectors   Size Id Type
/dev/sda1  *         2048   1126399   1124352   549M  7 HPFS/NTFS/exFAT
/dev/sda2         1126400 102402047 101275648  48.3G  7 HPFS/NTFS/exFAT
/dev/sda3       102402048 135956479  33554432    16G 82 Linux swap / Solaris
/dev/sda4       135956480 468862127 332905648 158.7G  5 Extended
/dev/sda5       135958528 175017985  39059458  18.6G 83 Linux
/dev/sda6       175022080 237936641  62914562    30G 83 Linux
/dev/sda7       237940736 468862127 230921392   675G 83 Linux

I partitioned the new disk as a copy of the old drive, except for the data partition which was smaller as the disk was smaller. I used dd to clone each partition on to the corresponding new partition using the following command: (where sdb was the new drive).

dd if=/dev/sda1 of=/dev/sdb1 bs=2k

Once I copied the partitions over, all I had to do was refresh the GRUB boot loader config using the following command:


After the config was updated, I was able to boot into Linux from both my Debian and Kali partitions on the new drive. However, that didn’t work for Windows. It gave be a screen-full of random characters like what you see when you try to open a binary file in a text editor and refused to boot. Thankfully I had not deleted the old windows partition so I was able to try a few more things, but *nothing* worked. Windows would just refuse to boot from the new drive. The only solution I found that could have potentially worked was a Paid software that supposedly allows you to clone your windows install on new disks/computers. Since I didn’t want to spend money on something I should have been able to do for free, I didn’t try it.

In the end after wasting a lot of time on this, I was tired of trying various things so just decided to reinstall windows on the new drive. It wasn’t a major loss because I didn’t have much data on Windows but I still dislike the fact that I had to do so just to put in a new drive. Imagine the hoops I would have had to jump if I wanted to move to a new computer. Actually I don’t have to imagine, I did jump thorough them when I moved my install from my old laptop to this one.

My linux install on the laptop is an exact clone of my desktop install. I used dd to create an image of my Linux install on the desktop and then wrote the image on the laptop. It worked perfectly fine at the first try. All I had to change was the hostname so that my DHCP server didn’t have a nervous breakdown but other than that everything worked without a single problem. Even the graphics drivers auto adjusted on the new machine. Imagine if we could do the same thing for a Windows install.

– Suramya

Sorcerer to the Crown (Sorcerer Royal 01) by Zen Cho

Filed under: Reviews-Fantasy — Suramya @ 1:32 AM

Sorcerer to the Crown (Sorcerer Royal 01) by Zen Cho


Magic and mayhem clash with the British elite in this whimsical and sparkling debut.

The Royal Society of Unnatural Philosophers maintains the magic within His Majesty’s lands. But lately, the once proper institute has fallen into disgrace, naming an altogether unsuitable gentleman as their Sorcerer Royal and allowing England’s stores of magic to bleed dry. At least they haven’t stooped so low as to allow women to practice what is obviously a man’s profession…

At his wit’s end, Zacharias Wythe, Sorcerer Royal of the Unnatural Philosophers, ventures to the border of Fairyland to discover why England’s magical stocks are drying up, an adventure that brings him in contact with Prunella Gentlewoman, a woman with immense power and an unfathomable gift, and sets him on a path which will alter the nature of sorcery in all of Britain—and the world at large…

Buy From:

Rating: (4/5)


This was an interesting book to read, England is running low on magic and the magician’s blame the first black person who is the Sorcerer Royal. The book is well written for the most part but there were times it was infuriating how casually the white men (gentlemen) in the story disregarded even the possibility that a woman could have magic and that a black man could be better qualified for a job than they are. This is classic white male supremacy and the arrogance displayed was annoying (but hardly unrealistic). However, the book doesn’t harp too much about this and most of the stuff I spoke about earlier is done in a matter of fact manner.

The character of Prunella was well written and even though initially it wasn’t clear why she had this power over the course of the book things are made clearer. There is an aspect of romance in the book but it felt kind of shoehorned in and didn’t gel with the rest of the story as well as it could have. Not to say it was bad but that it could have been better.

There was one aspect that was really jarring and didn’t gel with Prunella’s personality up to that point. It was completely unexpected and felt out of character for her. On top of that the book just glossed over the incident like it was no big deal even though it should have had major consequences for her.

The world created in the book has a lot of potential and so does the author. I am trying to get the next book in the series and am hoping I like it as much or more than this one.

April 7, 2021

Creating movies using AI designed storylines with the best chance of box-office success

Filed under: My Thoughts — Suramya @ 11:21 PM

There are times when I feel that the latest hits in movies or TV shows are just trying to recycle the same ‘formula’ for success. You take what worked before in another movie and try to do the same thing again, either in another setting or just a do another remake of a hit movie. However, till date at least there was some element of human ‘innovation’ involved. If it is up to the Researchers from the Spanish universities of Granada and Cádiz this will no longer be the case. They have created an AI which will use machine learning and AI to ‘assist film scriptwriters produce storylines with the best chance of box-office success‘.

Be prepared to get the 400th reimagining of a pirate story, or a space opera or love story because the AI will predict success and because it will use existing tropes to figure out what is successful there will be a lot fewer movies/shows that push the boundaries. So, movies like the Matrix, ‘Inception’, 2001: A Space Odyssey, or The Blair Witch Project etc will become more and more rare because the studios would be unwilling to risk putting in money into movies that are not a sure hit.

There are a lot of things that Machine Learning and Artificial Intelligence can do, but artistry and innovation is not one of them.

The full Paper is available here: The Simpsons did it: Exploring the film trope space and its large scale structure

– Suramya

April 6, 2021

What are the Long-term effects on aggression of exposure to violence in media?

Filed under: My Thoughts — Suramya @ 5:55 AM

Violence in media is something that has become a cornerstone of the belief amongst some people as to how the society nowadays is more decadent and violent than what it was a few decades ago. One of the reasoning people give is that the amount of violence on TV and in media is increasing because people are getting desensitized to it and want more. Most of the research into this phenomenon agrees that there are both short-term and long term impacts of watching violence in Media. For example, we have a study that uni-vocally claims that there are significant short-term effects of violent media in adults and long-term effects in children after exposure to violent media. (Bushman & Huesmann, 2006)

Media violence scholars have identified several basic psychological processes involved. Short-term effects are those that occur immediately after exposure. The main ways that media violence exposure increases aggression in the short term are:

  • Direct imitation of the observed behavior
  • Observational learning of attitudes, beliefs and expected benefits of aggression
  • Increased excitation
  • Priming of aggression-related ways of thinking and feeling

Basically, the more normalized a particular behavior becomes the more people will think and act in that way. For example, in a lot on Indian movies there is a theme of the boy falling in love with a girl who does not love them back. The hero then proceeds to stalk, harass the girl who then falls in love with him and they live happily ever after. There have been a few instances where college kids tried the same approach in real life not realizing that this is not appropriate behavior. In essence, for at least a brief period after viewing or playing violent media, the exposed person thinks in more aggressive ways, feels more aggressive, perceives that others are hostile towards him or her and sees aggressive solutions as being more acceptable and beneficial.

The short-term effects typically dissipate quickly. However, with repeated exposure to violent media, these short-term lessons are learned in a more permanent way and the person comes to lean towards more aggressive solutions to conflict. There also is growing evidence that repeated exposure to blood, gore and other aspects of extremely violent media can lead to emotional desensitization to the pain and suffering of others. If a person is already mentally leaning towards violent behavior or socially maladjusted, they will get more influenced by the violent depictions on screen and be tempted to try it out in real life. However, in other people it has been found that watching violence on screen or in video games acts as a sort of pressure release and allows them to channel the anger and hurt in a way that does not harm actual people.

Habituation is a form of non-associative learning in which response to a stimulus decreases after repeated or prolonged presentations of that stimulus. Basically, it means that if someone is exposed to a stimulus (like violence in media) repeatedly there is a decrease in their response to the stimulus. For example, if a new sound like a loud is happening next to you it will draw your attention initially and be very distracting but if it keeps happening then a person becomes accustomed to the sound and pay less attention to the noise reducing their response to it. I have seen it happen with people living next to airports, over a period of time they do not even notice the sounds of the planes landing even though visitors to their house comment on it.

Cultivation theory on the other hand suggests that people who are exposed to media regularly over a prolonged period of time will start to perceive the world as presented in the media they consume. For example, if someone is constantly consuming far-right videos and talking points about how the immigrants in the US are the cause of most of the country’s problems and how they are violent and lazy they will start thinking this is real and behave accordingly in the real world as well. There have been documented cases of people attacking immigrants in the US because they believed that their way of life is under threat from them. The fact that this may or may not be true does not come into the picture as they are conditioned to believe in this ‘fact’.

Media has a tremendous power to change the public perception and that is why people are worried about the amount of violence being depected in it. Movies like the Joker and similar movies normalize the violent behavior and that is what scares most physiologists.

– Suramya

PS: This essay was originally written for my Social Psychology class. Hence the really more formal writing style.

April 5, 2021

What reason would anyone have to convince people that the earth is not flat?

Filed under: Astronomy / Space,My Thoughts — Suramya @ 11:34 PM

A few days ago a Flat Earther, or to be less polite: a stupid idiot was arrested for burning down 3 masonic lodges as he posted a note on Social media claiming to “I just cleaned 3 satanic club houses and nobody could do anything.”. This news made me think about the whole Flat Earth conspiracy again and actually find the whole flat earth conspiracy quite interesting since there is absolutely no proof that earth is flat but still people keep insisting that it is. When asked for proof we are pointed towards Youtube videos as if they are actual science research.

The most interesting thing about it for me is that people always claim that the establishment, or the government and the media or whatever are part of a giant conspiracy to fool people into thinking the earth is flat. But no one has given an explanation as to why they would do something like that. I mean what is the government achieving by making people think the earth is not flat. Everything needs a reason to exist and as far as I can tell there is no reason for the government to fool people into thinking the earth is a sphere. In the middle ages there was a movement that said that the earth was flat because the bible said so but now unless I am mistaken even the church agrees that this is not the case.

According to the conspiracy theorists people have been spending trillions of dollars to make people believe in something that is not true. However whenever we spend money (especially that amount of money) the goal is to achieve something or get something. I have so far been unable to figure out what that is. Looking that the flip side, most of these conspiracy theorists have a financial motive for pushing the theory. From selling merchandise to speaking gigs to book deals etc they have a lot of interest in pushing this theory to the unenlightened masses.

Personally I would rather believe the scientists, researchers, religious figures and scripture. In Hinduism for example, the Surya Siddhanta published from between 350 and 400 CE states that the earth is a sphere and calculates the earth’s diameter to be 8,000 miles (modern: 7,928 miles), the diameter of the moon as 2,400 miles (actual ~2,160) and the distance between the moon and the earth to be 258,000 miles (now known to vary: 221,500–252,700 miles (356,500–406,700 kilometres). I would rather believe these experts than the so called ‘experts’ on youtube who are only there to make money.

How the world looks according to a flat earther

– Suramya

Older Posts »

Powered by WordPress