-
Notifications
You must be signed in to change notification settings - Fork 220
Reflection on GSoC 2019
The section I worked on can be seen here: Chapter 24, PR177
The purpose of my project this summer was to work on writing explanations and demonstrations for chapter 24 which deals with AI and perception. I was specifically interested in expanding upon the edge detection covered in the textbook.
The final product was an explanation broadly exploring Canny edge detection. The text attempts to create a step-by-step intuition that takes the reader from the color image input of the algorithm to the final edge-detected output with demos supplementing the text by providing practical examples. For example, many of the demos allow image and webcam input to show how a step of the edge detection algorithm processes its input.
Looking forward, there is much more work that could still be done on this section. Canny edge detection was not comprehensively covered and more pages on the algorithm could be written. In addition, there are many unexplored sections in the perception chapter such as those on image segmentation and 3D world reconstruction which would be very interesting to see fully implemented and explained as future projects.
Prior to this, the perception chapter was untouched. Canny edge detection is a relatively straight-forward algorithm and something that I thought would be a good addition to aima-javascript.
I started off taking inspiration from Victor Powell's image kernel explanation and going for a more numerical approach with most of the demos, trying to explain all the underlying math. However, this also made them hard to understand at first glance. After getting some feedback, I ended up aiming for more visually intuitive diagrams that could be understood faster while leaving the implementation details as an exercise for the reader.
One of the most difficult parts of this project was trying to express change across an image to the reader. We eventually settled on putting an image into a 3D space and using a tilted arrow whose steepness would show the level of intensity change in a neighborhood of pixels. This analogy worked well but also made it difficult to move the concept of change in 3D back to a 2D image. I had initially used a diverging colormap to show negative and positive changes, but this was later swapped out with arrows drawn on each pixel cell which was able to better show negative versus positive.
A major aspect of designing demos that I learned is that good demos seem to be able to condense information in a presentable way. One of my early diagrams demonstrating convolution was composed of four different grids stuffed into a control panel setup. It made sense to me, but only because I designed it. Going through several iterations, we eventually reduced the demo down to one main grid and a smaller, hovering one. This new diagram retained most of the information from the original, but now, despite being condensed, it was actually easier to parse.
Overall, I feel very satisfied with this project. I was not sure how much I could do before this and didn't plan too much in my proposal, so looking at the final result, I feel that I was able to learn a lot about many features in JS and use them to actually create helpful learning tools.
I didn't know about aimacode before GSoC. It was only after finding the AIMA textbook, flipping through it, and seeing some eerily familiar pseudocode did I realize I had been assigned reading excerpts out of it from an old AI class I took in high school. Suddenly seeing that aimacode was connected to a resource that first helped me get into AI made me really excited since now I would be the one getting a chance to contribute back by working on a supplementary resource.
As a newcomer to GSoC, aimacode was very supportive and welcoming while challenging me, at the same time, to come up with better explanations and demos to explain my topic. It made me think, not just as a programmer, but as a designer and as an educator, asking how to best show or teach something using my ability and not simply just to write code.
If you are interested in doing more with AI, consider participating in GSoC and writing a proposal for aima-javascript. It was a really great experience and has personally taught me a lot more about classical AI and the principles behind creating good visual explanations.