Weekly check-in #3 (week 1): 27/05 to 02/06

tomasb
Published: 06/03/2019

Hey! So we are done with week 1 ...

What did you do this week?

Finishing this week, I can now feed Keras models and images to ELI5 and make it show visualisations of them. I have wrapped a working Grad-CAM implementation I found on GitHub, and made changes to it such as ability to choose a layer and prediction to do Grad-CAM on. Grad-CAM produces a “heatmap”, so I have added an “image formatter” that takes that heatmap and overlays it over the original image. During the week I caught up with my mentors, going through the Grad-CAM paper, and called with some Scrapy students to get to know each other.

What is coming up next?

Week 2 will be a split between two activities. First, I will do testing. It will be essential to add some automated tests using PyTest and tox. Some manual tests using different datasets and models would also be nice. Secondly, I will need to perform optimisations, refactorings, and improvements to the code added in week 1. One interesting task will be making Grad-CAM work beyond classification-based models, i.e. regression, etc. I hope that by the end of week 2 or 3 my branch will be in a good shape for a Pull Request.

Did you get stuck anywhere?

I had troubles with implementing/wrapping Grad-CAM itself (more on that in the upcoming weekly blog, but testing what works THEN changing things, and mentors’ advice, had certainly helped).  A slight blocker was also low responsiveness of my machine when testing with large models in memory. Fortunately smaller models exist so I don’t always have to use VGG16!

 

1 down and 11 more to go! Thanks for reading!

Tomas Baltrunas

View Blog Post

Weekly check-in #2: 21/05 to 26/05 (community bonding)

tomasb
Published: 06/03/2019

Hi! This is a check-in for the last week of community bonding. I am writing this at the end of week 1, so I hope I still remember most of what I did!

What did you do this week?

Briefly tested out Tox and Sphinx on my machine. Made sure I can run all the environments specified in ELI5’s tox.ini: I had to apt-get some python-dev packages, and comment out the installation for xgboost 0.6a2 due to installation issues on Ubuntu. Set up a few virtualenv’s. Installed PyCharm IDE. Git clone’d existing Grad-CAM implementations for Keras and checked that they work using examples from ImageNet. Commented the source code by stepping through it with pdb. Looked at the authors’ implementation of Grad-CAM in Lua.

What is coming up next?

Week 1 tasks will begin! As scheduled I will implement Grad-CAM for images (working with Keras models). One change will be that I will make automated tests during week 2, not week 1. Instead of testing this week, I will add an image formatter so that I can get immediate feedback of the Grad-CAM algorithm implemented. There were some things that I planned to do during this week, but prioritised them for later, including: Enabling my GPU to use with ML libraries, learning about RNN’s, and setting up virtualenvwrapper/pyenv instead of plain virtualenv.

Did you get stuck anywhere?

At the end of the week I was stuck at understanding the details of Grad-CAM and how is it implemented in Keras. I wish I could’ve spent more time on learning actual Keras and doing some CNN visualisations.

 

Thanks for reading again!

Tomas Baltrunas

View Blog Post

Weekly check-in #1: 13/05 to 20/05

tomasb
Published: 05/20/2019

Hello everybody. Checking in for the first time under ELI5 (Scrapinghub), implementing Grad-CAM for neural networks.

What did you do this week?

Briefly looked into some auxiliary tools such as PyTest and mypy. Called with mentors for the first time. Discussed workflow and preparation details, such as when to call, create pull requests, and document code. Mentioned some things to do in the future - i.e. use Google Colab when need hardware to train a network, consider how to test image output, go through the technical Grad-CAM paper together. In the suborg's Slack, discussed how everyone should give updates.

What is coming up next?

Set up a recommended environment: PyCharm IDE, Jupyter notebooks for manual testing, one virtualenv for development and tox for testing on other environments. Enable recent libraries such as CUDA 9 on my local NVIDIA hardware. Install, use, and look over source code of existing Grad-CAM implementations. Look over and do the relevant parts of the recommended course at http://cs231n.stanford.edu/. Briefly learn tox (make sure the project's tox config works for me locally) and look into Sphinx very briefly.

Did you get stuck anywhere?

No specific issues yet, just overall a bit slow to start looking into the actual topic of the project- Grad-CAM.

Thank you for reading!

Tomas Baltrunas

View Blog Post