Title: A day in the life of a Adrian Rosebrock: computer vision researcher, developer, and entrepreneur. - PyImageSearch

URL Source: https://pyimagesearch.com/2017/01/30/a-day-in-the-life-of-a-adrian-rosebrock-computer-vision-researcher-developer-and-entrepreneur/

Published Time: 2017-01-30T15:00:12+00:00

Markdown Content:
![Image 1: aditl_header](data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20600%20506'%3E%3C/svg%3E)

Ever wonder what it’s like to work as a computer vision researcher or developer?

You’re not alone.

Over the past few years running PyImageSearch I have received emails and inquiries that are “outside” traditional computer vision and OpenCV questions.

They instead focus on something _much more personal — **my daily life.**_

PyImageSearch reader Jared, asked:

> “What is it like being a computer vision researcher and developer? What do you actually do day-to-day?”

Another reader, Miguel, inquired:

> “You’ve written a computer vision book and a course. And now you’re starting a new book on deep learning? How do you get all this done? What’s your secret?”

Saanvi’s suggestion is one of my personal favorites:

> “Adrian, you should write your next book on productivity.”

Now that the _[Deep Learning for Computer vision with Python](https://www.kickstarter.com/projects/adrianrosebrock/deep-learning-for-computer-vision-with-python-eboo)_ Kickstarter campaign is online, I’ve been getting more of these questions than ever.

Because of this, I thought I could do something a little different today — **give you an _exclusive, behind the scenes look_ at:**

*   How I spend my day.
*   What it’s like balancing my role as a _computer vision researcher/developer_ with a _writer on PyImageSearch._
*   The habits and practices I’ve spent years perfecting to _help me get shit done_.

**To see what it’s like to live a day in my shoes, _keep reading._**

Morning (5:15AM – 12:00PM)
--------------------------

The follow blog post follows my daily activities on Monday, January 23rd.

### Getting out of bed

![Image 2: Figure 1: I wake up around 5:15AM every morning.](data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20281%20500'%3E%3C/svg%3E)

**Figure 1:** I wake up around 5:15AM-5:20 every morning.

5:20AM.

My alarm goes off on my iPhone.

I reach over and turn it off after a few seconds, readjusting to consciousness.

_Time to get out of bed._

I don’t think twice about it.

I don’t check Facebook notifications. I don’t look a Twitter. And I don’t even _think_ about checking email.

I sit up

Stretch.

And immediately drink 12oz of water from the Nalgene on my nightstand.

The water helps start my metabolism, flushes out toxins built up from the night before, and most importantly, _helps me hydrate_ — at this point I’ve gone ~8 hours without water and I need to rehydrate. Your brain tissue is 75% water after all.

This 12oz of water is the first of **~200oz** I’ll consume throughout the rest of the day.

The day has started and I only have one goal: _get shit done._

### Caffeinate (strategically)

![Image 3: Figure 2: Every day starts off with a strong cup of coffee with a splash of heavy cream. This is my only caffeine intake for the entire day.](data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20375%20500'%3E%3C/svg%3E)

**Figure 2:** Every day starts off with a strong cup of coffee with a splash of heavy cream. This is my only caffeine intake for the entire day.

My work day starts _immediately_.

I walk from the bedroom to the kitchen and prepare a nice hot cup of coffee — _this is the only caffeine I will consume the entire day._

Don’t get me wrong:

**I love coffee.**

But I’m also a strong believer in the _strategic_ use of caffeine (whether in coffee or tea form).

Back in graduate school I would drink a large mug of coffee in the morning followed by a massive iced coffee from Dunkin Donuts soon after lunch. By the afternoon I felt _exhausted_. I didn’t realize my caffeine intake was actually _hurting_ my productivity.

Caffeine may give you a short term jolt of energy, but it also comes with a crash later on in the day. Therefore, we can actually view consuming caffeine as _borrowing_ energy from _later_ in the day. That energy and focus have to come from somewhere. And unfortunately, that “loan” must be paid in the afternoon during our crash.

Two years ago I stopped consuming large amounts of caffeine.

Now all I have is a (very) strong dark roast in the morning with a splash of heavy cream. The heavy cream contains fats that help jumpstart by brain. I avoid sugar as much as possible.

### Check on neural network training

I’m currently running a [Kickstarter campaign](https://www.kickstarter.com/projects/adrianrosebrock/deep-learning-for-computer-vision-with-python-eboo) to fund the creation of my new book, _Deep Learning for Computer Vision with Python_.

For this book I am running a _bunch_ of experiments where I train various network architectures (AlexNet, VGGNet, SqueezeNet, GoogLeNet, ResNet, etc.) on the _massive_ ImageNet dataset.

I currently have experiments running for both VGGNet and SqueezeNet. These networks have been training overnight so I need to:

*   Inspect their accuracy/loss curves.
*   Determine if the networks are overfitting (or at risk for overfitting).
*   Adjust any relevant hyperparameters (i.e., learning rate, weight decay) and restart training.
*   Estimate when I should check the networks again.

First up is VGGNet:

![Image 4: Figure 3: VGGNet is hitting 53.52% rank-1 accuracy after 20 epochs. Learning is starting to stagnate, but adjusting the learning rate now would be too early.](data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20600%20450'%3E%3C/svg%3E)

**Figure 3:** VGGNet is hitting 53.52% rank-1 accuracy after 20 epochs. Learning is starting to stagnate, but adjusting the learning rate now would be too early.

After just 20 epochs of training VGGNet is hitting 53.52% rank-1 accuracy.

Accuracy (and loss, not pictured) are starting to stagnate slightly — I will likely have to lower the learning rate from 1e-2 to 1e-3 within the next 20 epochs.

Then comes SqueezeNet:

![Image 5: Figure 4: Learning has definitely stagnated for SqueezeNet. Time to update the learning rate.](data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20600%20450'%3E%3C/svg%3E)

**Figure 4:** Learning has definitely stagnated for SqueezeNet. Time to update the learning rate.

Epochs 0-45 were trained with a 1e-2 learning rate. As training and validation accuracy/loss started to diverge around epoch 45 I updated the learning rate to be 1e-3.

However, we can now see that learning is quite stagnated and unable to get above the 50.2% rank-1 hump.

We are also getting a bit of overfitting, but nothing too terribly concerning (yet).

I’m going to change the learning rate to 1e-4, but I’m not really expecting any more large gains in accuracy out of the experiment at this point.

Future experiments with include replacing the default activation function (ReLU) with a leaky ReLU variant (such as ELU). I’m also considering playing around with adding BatchNorm layers to the architecture as I’m unaware of any previous SqueezeNet experiments that have done this, but I have seen it (successfully) work before with other micro-architectures such as GoogLeNet and ResNet (experimenting is half the fun, after all).

The reason why I spend the first 10 minutes of my morning look at training progress is so I can update any relevant hyperparameters and continue training the network.

Some of these networks can take a _long_ time to train (VGGNet is currently taking ~2.9 hours per epoch) so it’s important to spend time looking at the accuracy/loss, _then moving on with your day_ (and trying not to think about them again until you have _more_ data to make an informed decision with).

When I first started working with deep learning I was guilty of making a critical mistake: **looking at my loss/accuracy plots too often.**

When training deep neural networks you often need the _context_ of 10-15 epochs to make informed decisions regarding updating learning rates and _which_ epoch you restart training at. Without this context you’ll find yourself spinning your wheels and _overthinking_ the training process.

Let your network train.

The results will come in.

And then you’ll be able to make an informed decision on how to continue.

### What about email?

You might be wondering why I’m not popping open my inbox and reading through my email?

The answer is because my mornings are my most _productive and creative_ time of the day, thus I guard this time very closely. These hours of the day are the equivalent to by _[Biological Prime Time](http://alifeofproductivity.com/calculate-biological-prime-time/)_ where I have the most energy and are most likely to be hyper productive.

**In short, my goal for this time of day is to reach [flow state](https://en.wikipedia.org/wiki/Flow_\(psychology\)) _as soon as possible_ and _maintain it for as long as possible._**

I classify email as a _procedural task_ — read email, reply, and repeat until inbox is empty. It’s not task that requires creative energy.

On the other hand, there are a lot of tasks I undertake that are _creative_ in nature. Examples include:

*   Writing a new blog post/tutorial.
*   Outlining a chapter in my upcoming deep learning book.
*   Working on a tricky piece of code.
*   Researching a new algorithm.

All of these tasks require a bit of extra brainpower stemming from the creative side. I spend my mornings working on these types of tasks. Email has its place, just not until later in the day.

### Planning my “3 Big Things”

I first heard the phrase _“relentless execution”_ from [Rob Walling](http://www.softwarebyrob.com/) a year or two ago at a conference. The cornerstone of the idea is something we’re all familiar with:

1.  Break a complex project down into smaller pieces/sub-pieces.
2.  Individually complete each piece.
3.  Combine the pieces together to form the solution to the problem.

The concept of _relentless execution_ focuses on Step #2. Once we’ve identified the parts that make up the whole, we need to **relentlessly and consistently** complete them on a day-to-day basis.

This also goes hand-in-hand with _incremental improvement —_ **small, consistent daily changes added up over a period of time yield large growth.**

To facilitate this process I spend every Sunday morning planning out the tasks that I want to get done the following week. You can think of this list as an informal sprint task list that developers use, except:

1.  This list combines business _and_ software tasks.
2.  Is done on a weekly basis rather than every 2-3 weeks.

Every morning I take three of the tasks from my _weekly_ list and add them to my _3 Big Things_ I aim to accomplish for the day:

![Image 6: Figure 5: Setting my "3 big things" for the day. My goal will be to accomplish all three of these tasks before my day ends.](data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20450%20600'%3E%3C/svg%3E)

**Figure 5:** Setting my “3 Big Things” for the day. My goal will be to accomplish all three of these tasks before my day ends. (_Note:_ Apparently I missed the “3” in “23” when writing in my notebook that day — I’m only human after all!)

Today my three big tasks are:

1.  Document _“A day in my life”_ (which allowed me to write this blog post).
2.  Plan out the Kickstarter stretch goals for my deep learning book ([which you can find here](https://www.kickstarter.com/projects/adrianrosebrock/deep-learning-for-computer-vision-with-python-eboo/posts/1790713)).
3.  Start working with age/gender classification (one chapter in my upcoming deep learning book will demonstrate how to use CNNs to classify the age and gender of a person from a photo; more on that later in this post).

Again, Being productive and solving challenging problems isn’t about solving them all at once. Instead, break down large, complex problems into smaller pieces and solve each of them individually. Doing this on a daily basis guarantees you incremental “wins” which add up in the long run. Not to mention, aiming for smaller wins in the short term allows you to create momentum and gives your brain a nice endorphin rush.

If you haven’t noticed yet, I’m a _big productivity geek_ so if you’re interested in learning more about productivity hacks you can apply to your own life, check out _[The Productivity Project: Accomplishing More by Managing your Time, Attention, and Energy](http://amzn.to/2ksN3Sa)_ by Chris Bailey.

I normally don’t recommend productivity books (since they tend to rehash the same material), but Chris’ is the real deal.

### Start on item #1

After I’ve mapped out my “3 Big Things” for the day I immediately jump into the first one.

Today is a special case since I’m _already_ documenting my day and will be for the rest of the day.

I then move into #2, planning out the Kickstarter stretch goals. I’ll continue doing this task until breakfast.

### Breakfast

My mother always told me that breakfast is the most important meal of the day — _I never believed her_, but then again, that might be because I didn’t get out of bed until 10:30AM when I was in college.

It wasn’t until I started getting up around 5AM in the morning _every day_ that my perspective shifted and I realized breakfast _is_ the most important meal (at least for me).

Having a large healthy breakfast of proteins, fats, and veggies ensures that I’ll be able to come off the caffeine high and continue to be productive, even towards the end of the morning. Furthermore, going with a high protein, high fat diet ensures the fats deliver a longer, sustainable energy burn throughout the rest of the day — this is also beneficial when I go to the gym in the mid-afternoon.

For the health geeks out there (like me) I’m referring to a [paleo-esque diet](https://en.wikipedia.org/wiki/Paleolithic_diet), a diet that consists predominantly of veggies, fruits, nuts, roots, and meats. Dairy products (there is no lactose in heavy cream), grains, and processed foods are avoided.

There are _many_ variations and interpretations of the paleo diet and it’s taken me a few years to zero-in on what works for me. For example, I’ve been able to add in small amounts of dairy (like cheese) into my diet without adverse affects. The fun part about these types of diets is finding what works for you _personally_.

In my case, I’m fortunate enough to have a fiancé that prepares breakfast every morning (yes, _every morning_). I’m extremely lucky and grateful to have hit such a jackpot.

At around 7:45AM her and I eat breakfast together before she heads off to work. Doing this ensures we have quality time together every morning:

![Image 7: Figure 7: Between 7-7:30AM each morning I have a breakfast heavy in proteins and fats.](data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20600%20450'%3E%3C/svg%3E)

**Figure 7:** Between 7-7:30AM each morning I have a breakfast heavy in proteins and fats.

Today I’m having:

*   Three eggs scrambled with sausage, onions, peppers, and spinach.
*   Two slices of bacon.
*   A handful of orange slices.

Her and I have breakfast together and then around 8:15AM I go back to work.

### Turning off notifications

After breakfast all notifications go off so I can reach and maintain flow state.

My iPhone is silenced.

Slack is shut down.

I don’t even think about checking Facebook, Twitter, or reddit.

Next I put on Gunnar eye glasses (to reduce eye strain; I have issues with [ocular migraines](http://www.webmd.com/migraines-headaches/guide/ocular-migraine-basics) if I strain my eyes too long under stressful situations) and noise canceling headphones to ensure I’m not disturbed:

![Image 8: Figure 8: Noise canceling headphones and strain reducing glasses help me reach (and sustain) flow state.](data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20600%20450'%3E%3C/svg%3E)

**Figure 8:** Noise canceling headphones and strain reducing glasses help me reach (and sustain) flow state.

Lastly, I even turn off the actual _clock_ on my desktop:

![Image 9: Figure 9: No distractions include turning off the clock on my desktop.](data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20600%20342'%3E%3C/svg%3E)

**Figure 9:** No distractions include turning off the clock on my desktop.

Time is constant distraction. It’s too easy to look up from your work and think _“Man, I’ve been at this for 40 minutes”_ and then allow your mind to wonder. In short, looking at the clock breaks flow state.

Instead, turn off your clock and stop caring — you’ll realize that time is relative and you’ll break from flow when you’re naturally tired.

Now that I’m “in the zone” my goal is to finish up planning the Kickstarter stretch goals along with creating visualizations for GoogLeNet’s _Inception module_ and ResNet’s _Residual module:_

![Image 10: Figure 10: Tackling the first task on my list for the day -- planning the stretch goals and designing images for them.](data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20600%20450'%3E%3C/svg%3E)

**Figure 10:** Tackling the first task on my list for the day — planning the stretch goals and designing images for them.

By 10:54AM I have finished planning the Kickstarter stretch goals and the network module visualizations.

From there I come out of flow so I can share the latest PyImageSearch blog post on social media (since it’s a Monday and new posts are published on Mondays):

![Image 11: Figure 11: Since it's a Monday I need to compose a tweet for the latest blog post that was just published on PyImageSearch.com.](data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20450%20344'%3E%3C/svg%3E)

**Figure 11:** Since it’s a Monday I need to compose a tweet for the latest blog post that was just published on PyImageSearch.com.

Before lunch I check-in on SqueezeNet again and see that loss and accuracy have topped out. I’m also seeing the threat of overfitting becoming bothersome (but again, not terrible):

![Image 12: Figure 12: Maxing out SqueezeNet accuracy for my current experiment. Time to record the results in my lab journal and try something new.](data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20600%20450'%3E%3C/svg%3E)

**Figure 12:** Maxing out SqueezeNet accuracy for my current experiment. Time to record the results in my lab journal and try something new.

I log the results to my lab journal and then update the code to experiment with BatchNorm. I kick the experiment off — and then it’s time for lunch.

### Lunch

My ideal time to eat lunch is between 11:00-11:30AM.

I normally eat leftovers from dinner the night before or a salad from the shop down the street. Since I don’t have any leftovers from last night, I opted for a salad:

![Image 13: Figure 13: A lighter lunch, but still packed with good fats.](data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20600%20466'%3E%3C/svg%3E)

**Figure 13:** A lighter lunch, but still packed with good fats.

On my salad I have roasted turkey, tomato, avocado (healthy fats!) and yes, a tiny bit of cheese. As I mentioned above, I’ve tweaked my own personal paleo diet over the years and found I can consume small amounts of dairy without it affecting my energy levels or overall health.

At this point I start consuming my daily allotment of [coconut water](https://en.wikipedia.org/wiki/Coconut_water) (about 300mL) along with my regular water. Coconut water helps reduce cortisol levels which in turn reduces stress. It’s also a good source of potassium.

### Meditation and mindfulness

After lunch I spend 10-15 minutes meditating. I personally like to use the [Calm app](https://www.calm.com/):

![Image 14: Figure 14: I like to use the Calm app for mindfulness and meditation.](data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20600%20521'%3E%3C/svg%3E)

**Figure 14:** I like to use the Calm app for mindfulness and meditation.

A bit of mindfulness allows me to re-center myself and continue with my day.

Afternoon (12:00PM – 5PM)
-------------------------

I start off my afternoon by picking the next uncompleted task off my “3 Big Things” list and cranking away on it. I continue to keep notifications off and keep my noise canceling headphones on.

If I’m outline a tutorial or writing a blog post I tend to go for instrumental music. _This Will Destroy You_, _Explosions in the Sky_, and _God is an_ _Astronaut_ are personal favorites for these types of task. The lack of lyrics allows me to not get distracted (I tend to sing along if there are lyrics).

On the other hand, if I’m writing code I normally default to music with lyrics — genres such as ska, punk, and hardcore are my favorite. I’ve spent countless hours in my lifetime coding to bands such as _Minor Threat_, _Dillinger Four_, and _The Mighty Mighty Bosstones_.

Today I’m starting some experiments for the _age and gender_ classification chapter of my upcoming deep learning book. Given a photo of a person the goal is to:

1.  Detect the face in the image.
2.  Determine the _age_ of the person.
3.  Approximate the _gender_ of the person.

Deep learning algorithms have been quite successful for this specific task and will make for an excellent chapter in the book.

To start, I download the [IMDB-WIKI face image dataset](https://data.vision.ee.ethz.ch/cvl/rrothe/imdb-wiki/) and start exploring.

My first task is to understand the `.mat` annotation file included with the dataset. After ~45 minutes of hacking I’m able to extract the date of birth, age, and bounding box for each face in the dataset:

![Image 15: Figure 15: Exploring the IMBDB-WIKI dataset and unpacking the annotations file.](data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20600%20373'%3E%3C/svg%3E)

**Figure 15:** Exploring the IMBDB-WIKI dataset and unpacking the annotations file.

I then take a subset of the data and attempt to fine-tune VGG16 on the data as an initial trial run:

![Image 16: Figure 16: A simple "proof of concept" experiment demonstrating that VGG16 can be fine-tuned for gender classification. This simple approach is obtaining 91%+ accuracy after only 5 epochs.](data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20600%20201'%3E%3C/svg%3E)

**Figure 16:** A simple “proof of concept” experiment demonstrating that VGG16 can be fine-tuned for gender classification. This simple approach is obtaining 91%+ accuracy after only 5 epochs.

As the above screenshot demonstrates, after only a 5 epochs I’m getting _**91%+ gender classification**_ accuracy. This initial experiment is successful and warrants more exploration into fine-tuning VGG16.

Around 2:30-3PM I head to the gym for 1-1.5 hours.

Fitness is a _huge_ part of my life.

I’ve played sports since I was a kid — soccer, baseball, basketball, you name it.

During my first year of graduate school I started weight lifting. I spent about a year lifting with a friend, and then when he graduated, I spent another year working out solo.

From there I found I got bored of the regular gym routine and started doing CrossFit. That eventually led me to olympic lifting. I now do a hybrid of olympic lifting (for strength) and CrossFit (for stamina).

The important takeaway here is the physical exercise is _key_ to a healthy life. It doesn’t have to be much — just getting out of your chair (or better yet, use a standing desk) and going for a walk around the block can dramatically increase your productivity (and save you from heart issues). Find out what works for _you_ and _keep doing it._ But also be mindful of what worked for you five years ago may not be working for you now.

Once I get back to the gym I shower and log back in to my computer.

Evening (5PM – 8PM)
-------------------

At this point in the day the creative portion of my brain is exhausted. I’ve been up for approximately 12 hours and I’m hitting the natural cycle of my day where I have less energy.

That said, I can still handle _procedural tasks_ without a problem, thus I spend much of this time reading and replying to emails.

If I don’t have any emails to answer, I might work on a bit of code.

Night (8PM – 10:30PM)
---------------------

Once 8PM rolls around I try to disconnect as much as possible.

My laptop goes into sleep mood and I try to stay off my phone.

I normally like to unwind at the end of the night playing whatever my favorite RPG is at the moment:

![Image 17: Figure 17: Spending the night unwinding and playing a bit of old school Final Fantasy on the SNES.](data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20600%20591'%3E%3C/svg%3E)

**Figure 17:** Spending the night unwinding and playing a bit of old school Final Fantasy on the SNES.

I just beat _The Witcher III: Wild Hunt_ (a game that has made its way into my “all time favorites list”) so I’m currently I’m playing through _Final Fantasy VI_ (called _Final Fantasy III_ in North America) on the SNES.

After a bit of gaming I might watch a bit of TV before calling it a night.

Then, it’s off to bed — ready to _**“relentlessly execute”**_ the following morning.

**If you enjoyed this blog post and want to be notified when future tutorials are published, _please enter your email address in the form below._**

![Image 18](data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20410%20567'%3E%3C/svg%3E)

#### Join the PyImageSearch Newsletter and Grab My FREE 17-page Resource Guide PDF

Enter your email address below to **join the PyImageSearch Newsletter** and **download my FREE 17-page Resource Guide PDF** on Computer Vision, OpenCV, and Deep Learning.