I programmed the artificial neural network from my previous post to process a video feed from my camera. Then, I pointed the camera at a youtube video of traffic to see if it could detect cars.
And, I am happy to say yes, technically it can detect cars from the video. It's a little hit or miss right now, but it can definitely pick up about 50% of the cars that pass by. Not only that - but the camera isn't hooked up to my desktop computer. I have this whole program (minus the youtube video) running on a $35 mini computer that is about the size of a deck of cards (Raspberry Pi). It's processing video at just under 3 frames per second.
I will need to work on getting that frame rate up higher - I'd like for it to be at least 5 frames per second, and 10 would be ideal. More importantly, I need to improve its comprehension. The photos that I trained the neural network on were mostly of cars taken from the side or taken from the back. If the training photos included some taken from above and at diagonal angles, I think the performance would improve a lot.
Below is a gif of the neural network in action. The red boxes are where it's looking. The boxes turn green when it thinks it sees a car. Yeah, obviously it has a ways to go - but it's a start.
Last Saturday, we went to see a band named Twiddle in Boston. The music sounded great. They are a jam band from Vermont. They are in the same genre as Phish and DMB, but they seem to stick to an "up-beat" funk sound. Clearly a lot of talent in this band.
We saw them in a venue called The Paradise - as you can tell from the photo, it's a pretty small place. I thought the venue was fun. I think some bands that are popular enough to fill a larger venue (such as the Orpheum, House of Blues, or Blue Hills Pavilion) would really be more at home in a place like this. Sometimes the music just belongs in a smaller venue without seats. I'd be willing to pay more for the tickets, really.
Picking up from where I left off on my previous machine learning post, which you can find here...
I am embarking on a personal project involving machine learning and computer vision. The project has four main goals:
Develop an artificial neural network that can identify vehicles within an image.
Optimize that neural network so it can scan between five and ten images every second (in other words, allow it to operate on a video stream).
Further optimize that neural network so it can run on a $35 mini-computer known as a Raspberry Pi (rather than my large desktop computer).
Develop some computer routines that utilize the above and collect data.
Learn as much as possible in the process.
Tonight, the project reached its first milestone: I programmed and trained my first artificial neural network. I trained it by showing it 6,592 images - half of which contained a car, and half did not contain a car. After viewing each image, the neural network would say whether or not it thought the image contained a car. If it guessed wrong, it would re-calibrate itself, and then we'd move to the next image.
The above sounds like a really boring a tedious process - but it's not. The training is all automated, and it completed in under one hour. After training, I showed the neural network about 750 images that it never seen before, and it was able to predict whether or not they contained a car with over 95% accuracy.
These accomplishments are rather mundane in the world of computer science - but its a humble start to the project. I can't make the neural network too flashy, or else Steps 2 and 3 will get very difficult.
Fire, agriculture, the wheel, electricity, the internet
Above is a brief overview of human technology. Obviously, there are tons of things we could argue about adding to this list: steel, the gun, the automobile, the airplane, the television, nuclear fission, the shamwow. But, in my person opinion, these five items are the fundamental stepping-stones of human technology. Each of these items were completely unfathomable to humans prior to their discovery. Also, each of these discoveries are disruptive; they changed the world – whether people like it or not! These are the big ones.
It’s interesting to think of what unfathomable discovery might be next on this list. Those who are smart enough to discover the next big thing will become legends. But, I am not sure if they will become rich. That’s because these fundamental discoveries are not “products”. They belong to the human race. It’s not like a company somewhere could make you pay a royalty every time you start a fire or spin a wheel. Sure, a company can sell you a lighter, or a tractor, or some electricity, or a connection to the internet – but these are just instances of the technology, no company “owns” the technology outright.
I think everyone can agree that these discoveries deserve to be left “unfettered”. In fact, I believe that the forces of nature will guarantee that these discoveries remain unfettered. For instance, if someone very powerful were to tell us that all wheels need to square from now on – I don’t think they would get very far. That’s because the circular wheel is out there, it’s been discovered, and that’s that. End of story.
I’d like to use the above is an introduction to the “Net Neutrality” debate going on in the U.S. right now. American politicians are currently struggling with question, “how do we make laws to keep the internet unfettered?” At first, that seems like a super simple question – but if you think about it, the definition of “unfettered” isn’t clear when it comes to the internet. Two viewpoints have emerged, and the FCC is likely going to vote on which viewpoint becomes law next month.
The reason why many people get confused by the net neutrality debate is that both “viewpoints” describe their version of an “unfettered” internet as “open” and “neutral”. It's just two different opinions on what "open" and "neutral" means. I will try my best to state each of these viewpoints below.
Viewpoint One: The internet is a crucial technology and no government agency should be allowed to dictate how any internet service provider chooses to deliver the internet to any person or company.
Viewpoint Two: The internet is a crucial technology and all internet service providers should be required to offer the same connection to all people and companies.
Think about those two viewpoints for a while - there are subtle differences. If you chose Viewpoint One, then you side with the current chairman of the FCC (Ajit Pai) and the Republican Party in general. This viewpoint really empowers existing companies that do business on and with the internet; so this viewpoint is good for business in that way. This viewpoint makes the internet somewhat similar to a shopping mall – some businesses will be able to afford a storefront, and others will not – but at the end of the day, a lot of money is going to be spent in that mall. The biggest criticism is that new companies will have a harder time finding a big presence on the internet.
If you happened to pick viewpoint 2, then you side with the founder of the internet (Tim Berners-Lee), and the Democratic Party in general. This viewpoint is better for small companies trying to start out on the internet, and it lets internet users have more variety. The drawback to this viewpoint is that internet service providers aren't provided the liberty to prioritize (or de-prioritize) content served to their subscribers.
If you want to know my opinion – in the long run, I think this doesn’t matter. In the short term, the government may be able to regulate the internet in some sort of way. But, I believe the internet has earned its spot on that list of the fundamental discoveries of mankind. Its like a force of nature now, and it will ultimately get used the way that is most efficient and meaningful for mankind. I’m honestly not sure which of these viewpoints will become law – but as the owner of a quaint low-traffic blog, I hope it will be viewpoint 2.
I've been spending some of my own time learning about computer vision, machine learning, and robotics. It has been very interesting, and I think I will make a post about it once a week or so.
Perceiving objects is something that us humans do quite easily, but for computers it is very hard. Computers like to operate using "rules" and it's impossible to write a set of rules for a computer to scan an image and determine if it contains a person, or a chair, or a house, or a lamp, or a pizza (or any other object). When a computer looks at a photo, it just sees pixels. It doesn't see objects, or shapes, or anything.
In the past few years, machine learning and computer vision have taken big steps forward. Researchers have learned that humans simply can't write code to teach a computer how see - but they can write code that will enable the computers to teach themselves how to see. These programs are called "artificial neural networks", and they have some parallels with the way our human brains work. The main premise of a neural network is that the pixels of an image are filtered through several "layers" of artificial neurons which parse the image in different ways. The first layer might detect edges, the second layer might detect shapes, the third layer might combine shapes into objects, and eventually the final layer will determine what object is being shown. I said "might" a lot in the last sentence because humans (including those who developed the fundamental mathematics and technology) don't really understand how the artificial neural network works. We just know that they do indeed work, and we know some of the basic theory behind it.
When an artificial neural network is first set up, it is very very unintelligent. It only becomes "smart" after you "train" it. If you're training a neural network to do object detection, you'll need to show it thousands and thousands of example images while telling it "this is a person", "this is a chair", "this is another person", etc. This process can take days or even weeks - and keep in mind that a fast computer can process hundreds of these training images every minute.
In the picture above, I was using an artificial neural network pre-trained by google (so they did most of the hard work here). It analyzed this photo and was 77% sure I am a person, and it was 94% sure that Violet was a cat.
Hello, yes I am still awake. I thought it would be fun to share this old picture of Jess holding a baby owl. This was taken on Jess's birthday, April 13, 2014 BC. The BC stands for "before comet."
The owl guy (I don't have a better term to describe this guy) brought the baby owl into the museum in an old toaster box, so I suggested the owl's name should be Toaster. I don't know if the guy went with my suggestion.
YouTube recommended I watch this video about a Koi Retailer from California traveling to Japan to buy new stock of Koi. I have no idea why YouTube recommended this obscure video to me; it has less than 400,000 views, so it's certainly not going viral or anything.
The video is honestly great though. Very relaxing, yet engaging. It's kinda long though, and I've only made it through the first half so far.
I've been on this planet for 30 years, and, despite my best efforts, I've interacted with humans in all 30 of those years. This makes me an expert on humans. To prepare for this post, I've contemplated the ways in which humanity may end, and developed nine terrible/fascinating categories.
Death by sun, and other cosmic threats
Stars - such as our sun - evolve through stages over time. The sun is currently in its "bro" stage and it's keeping our earth at a reasonable temperature for human life. But in about one billion years, the temperature of the sun will rise by about 10%. While that doesn't seem like much - it's actually enough to boil the oceans. But, if we still exist in one billion years we will probably have some dope technology to shield the planet from the sun. More likely, we will find a way to get off of the planet to begin with.
In about five billion years the sun will grow into a huge "Red Giant". This will greatly increase demand for sunglasses, and it will also disintegrate the entire planet. So we can consider that to be a hard deadline for humanity to develop a way to colonize other planets.
The sun is so powerful that it periodically farts out massive solar flares equivalent to billions of hydrogen bombs worth of energy. Fortunately, these "explosions" occur very far away. By the time their effects make it through the earth's atmosphere, they are too weak to affect anything other than radio signals. The sun also emits plasma ejections (known as CMEs), which are much more concerning. These could send a wave of electromagnetic energy to the earth strong enough to wipe out the power grid. There was a CME recorded in 1859 that was so strong that, if it had happened today, would have melted components in the power grids and left us without power, internet, and water nation-wide for a long long time. While that doesn't directly end humanity - it could be the catalyst for much more. Scientists don't really understand what causes these solar events - so they could happen at any time! So let's all be nice to the sun so it doesn’t decide to end us.
It's not just the sun that we have to worry about. By studying the long-term trajectories of the planets in our solar system, scientists have determined that there is a 1% chance that Mercury will go AWOL and smash into the earth. So...yeah, that's a new thing for you to worry about. Wouldn't it be cool if Mercury was about to crash into earth and then - out of nowhere - Mars swoops in and bashes Mercury off course?? And then Mars would say something cool like, "Thanks for sending me all those free rovers."
Lastly, collision from an asteroid is obviously a threat. An asteroid collision led to a mass extinction of 75% of plant and animal species about 66 million years ago - including all non-flying dinosaurs. In 1998, an even larger asteroid was heading towards earth but, fortunately, a group of misfit oil drillers were able to destroy it.
Every few million years we'll have to deal with a life-threatening environmental challenge - such as supervolcanoes. That's right - supervolcanoes. These are volcanoes so massive that they poop out enough ash to block out the sun, leading to a "volcanic winter". There is a volcano in Yellowstone National Park that erupted 600,000 years ago and covered the western half of the United States in ash. Scientists in 2013 discovered that the Yellowstone Caldera is closer to eruption than they previously thought - but, you shouldn't be worried about that because geologists say that massive earthquakes at Yellowstone are a bigger risk than volcanic eruption.
Interestingly, if humans manage to survive on this planet for 250 million more years, then they will see the continents slowly drift back together again to form a huge "supercontinent". This will render many "beach side" properties worthless - but the oceans are going to boil eventually, so its not that big of a deal.
I know that global climate change is talked about by just about everyone nowadays. Let's face it - climate change isn't science fiction anymore. It has weirdly become a political topic, and I am trying my best to be politically neutral because I don't want to upset anyone while talking about the end of mankind.
Even if we put the topic of man-made climate change aside - the earth is known to go through natural climate cycles. Ice ages happen - they were once cold enough to cover the oceans with a layer of ice. Warmer periods happen too. A study discovered that palm trees grew on Antarctica about 50 million years ago.
If you look at all the things that could end mankind on this list, I think you would agree that global climate change is the most lame. Come on, mankind - let's hold off long enough to die by some sort of alien invasion or something.
Ok here is where things get real. Fungal diseases and blights can halt the production of crops. In our modern world, the diseases can be transported (perhaps unintentionally) across the world on trucks, planes, trains, and boats. For example, in 1999 a relatively well-controlled wheat pathogen mutated in Uganda, and it's now spreading throughout Africa and the middle east. The UN estimates that 80% to 90% of wheat crops in the world are susceptible to this pathogen. Removing a large crop (like wheat) from the food supply can stress other food sources, and lead to food scarcity. I'm no agriculture specialist, but I suspect that there is a fear of further mutation of a pathogen like this, causing it to effect even more types of plants.
Personally, this strikes me more than any other item on this list. Most of these other risks are "out-there" enough to be a little comical. But the image of grocery stores with empty shelves is somehow very real and very scary to me.
On a slightly more positive note, a global seed vault in northern Norway contains "back-up copies" of seeds for many of the world's crops. They are stored for safe keeping in this giant icy vault - so we can potentially resurrect crops after they become wiped out. On a slightly less positive note, the operators recently revealed that the vault isn't protected against global climate change. Eeek.
We are more vulnerable to a global pandemic than ever before. Plus the availability of medicines at drug stores makes it easier for people to cope with minor "early symptoms" of a supposed pandemic - leading to even more contagion. Speaking of contagion - that's the name of good movie about a worldwide epidemic.
The University of Oxford believes an engineered pandemic is a higher risk for human extinction than a natural pandemic. This is likely true because a truly catastrophic virus would need to have the "perfect storm" combination of characteristics. It obviously needs to be highly contagious and it needs to have a high mortality rate. But, it can't kill its host too quickly, or else it wouldn't spread. I personally think its also important for the virus to have a cool name. Whoever's in charge of naming viruses needs to step up their game. Imagine if humanity was wiped out by something named Swine Flu? I mean come on, at least name the thing that kills us something formidable. Some name ideas for the World Health Organization: Lucifer's Grip, The Diabolic Flu, Sanjaya, Gazpacho.
There is a real parasitic infection known as Toxoplasmosis. Its a mostly non-serious infection caused by contact with cat feces. But - laboratory testing has shown that the parasite causes its host to be inexplicably attracted to cats. This is because the parasite can only reproduce in the gut of a cat, so it needs to manipulate its host to stay near cats so it can survive. Now, humans' immune systems are typically strong enough to prevent the toxo parasite from taking over their thoughts. But - here is where an unscientific theory of my own comes in - a global pandemic virus could somehow couple itself with a toxoplasmosis-like parasite that affects' peoples behaviors. It could control the thoughts of the infected! It could make them think they weren't infected! A horror/thriller movie director can take this idea and run with it. Just toss me a few bucks and put my name on the scrolling credit thingy.
This is a purely conceptual catastrophe that is often discussed by nerds. The idea is that if humans create artificial intelligence (AI) smart enough to improve itself, then the AI's intelligence would grow faster and faster until it eventually becomes a runaway unstoppable superintelligence that far surpasses the minds of all humans. It would become intelligent to the level that we cannot comprehend. It would hack into every internet connected device to expand its computational power. It would likely force humanity to submit to its will by controlling our vital resources and economics. If it perceives humanity as a threat, it would wipe it out.
You might think this is just a far-fetched geeky concept. But, Stephen Hawking and Elon Musk have both voiced concern about the possibility of runaway artificial intelligence. If you think about life on the planet - it has steadily progressed from single-celled organisms, to small multi-cell organisms, to animals, to mammals, to intelligent humans. We might not be the last step on that chain! The artificial superintelligence might be next, and humans might be as stupid as a fish in the ocean to it.
Scientific advancements have brought humanity to where it is today, and they will push us into the future. Some scientists are worried that the more ambitious experiments going on in the world could possibly lead to a global disaster. Take, for instance, the Large Hadron Collider (LHC) in Switzerland. This is a giant tunnel in the shape of circle, about 17 miles in circumference. Its purpose, to put it bluntly, is to smash particles together at high speeds to see what happens. It's more scientific than that, but let's keep it simple. Some scientists challenged the LHC experiments and believed they would open a black hole that would swallow the earth. They did the experiments anyways, and the earth didn't get destroyed - but I think I've made my point. It's all fun and games until you open a black hole and destroy the planet.
There are over 10,000 nuclear weapons on the planet right now. Why do we need so many? Someday, somebody is going to shoot one of those things at someone else. If Russia and the USA ever happen to shoot one at each other, the impending retaliation could quite literally end the world.
Just a month ago, a Soviet Officer with a fascinating story named Stanislav Petrov died of pneumonia at age 77. Petrov was working for the Soviet missile defense during the Cold War. In 1983, a computer malfunction caused the Soviets' early warning satellites to erroneously detect five nuclear missiles coming from the USA. Petrov was in charge, and he made a gut decision to not retaliate with their own nuclear arsenal. He told The Washington Post, "When people start a war, they don't start it with only five missiles." It was that paper-thin (yet ultimately correct) reasoning that saved the planet. By the way, Petrov was reprimanded for ignoring the warning system.
American Astronomer and Astrophysicist Frank Drake developed an equation to evaluate the number of extraterrestrial civilizations that may exist in the universe. As you might expect, the inputs to this equation rely heavily on assumptions. Reasonable evaluations of the equation range widely from essentially zero to several hundred million alien civilizations. Physicist Enrico Fermi argued that there cannot be several hundred million alien civilizations in the universe, because we would have been contacted by one of them by now. This is known as the Fermi Paradox.
Fermi has a good point. If there were that many alien cavillations, then chances are that at least one of them would have developed interstellar travel and paid us a visit. So does that mean that we are alone in the universe? Not necessarily. It could mean that interstellar travel simply isn't physically possible. It could also mean that any society smart enough to come close to developing interstellar travel ends up destroying itself from warfare or the AI singularity.
Or maybe it means that the civilizations who are smart enough to develop interstellar travel are also smart enough to observe planets like earth without interfering our development. Maybe they know about us, but they are waiting until we develop a certain technology before we are deemed worthy of interacting with them.
Perhaps alien lifeforms have already contacted us, but they differ from humans so much that we can't even comprehend what they are. Perhaps we are being destroyed by the aliens as we speak, but we don't even know how they are doing it, and why they are doing it.
Anyways, I better cut this stuff out before someone sends me to an insane asylum.
We've made a few attempts to contact aliens. We broadcasted the Arecibo Message into space in 1974 in hopes that alien life will detect and decipher it. The image might look like nonsense at first, but embedded within it there is a lot of information. For instance, the top half of the message provides information about DNA. The bottom gives information about the solar system and the human race. If you find that interesting, you'll love the information NASA packed onto a phonograph record attached to the Voyager 1 and 2 spacecrafts.
In conclusion - mankind will probably end eventually. All we can do is sit back and hope we're not ended by something as boring as global warming. While this is obviously slightly depressing, I found writing this somewhat therapeutic. If something in life has you stressed, just think about a supervolcano or a malevolent artificial superintelligence, and then everything won't seem so bad. If you're still stressed, then try to photoshop a cat into Kim Jong Un's hands - you'll feel better, trust me.
During my visit at home in western MA last Sunday, my mom found some of my old artwork. The top is a watercolor I made - presumably in elementary school. The bottom is a drawing I made. It's harder for me to approximate a date on that one - but I'd guess I drew it when I was 20 or so.
We spent some time looking for a book full of doodles, but we weren't able to find it. When we do find it, I'd like to upload some of it onto this site.