Blog
Where the blog posts hang out.
Automatic Bird Identification: Part III
Building our first model.
Training the Model
Now we can actually write the script that will train the model!
# USAGE
# python fine_tune_birds.py --vgg vgg16/vgg16 --checkpoints checkpoints --prefix vggnet
from config import bird_config as config
import mxnet as mx
import argparse
import logging
import os
# construct the argument parse and parse the arguments
ap = argparse.ArgumentParser()
ap.add_argument("-v", "--vgg", required=True,
help="path to pre-trained VGGNet for fine-tuning")
ap.add_argument("-c", "--checkpoints", required=True,
help="path to output checkpoint directory")
ap.add_argument("-p", "--prefix", required=True,
help="name …
Automatic Bird Identification: Part II
Building the rec files that our model will consume for training
In this post I'll be concentrating on creating the lst and rec files needed for model training using the training data that we generated in Part I of this series.
The model will use the mxnet framework which reads rec files as training data. First we'll create the lst files guided by a config file that we can define now:
The Config File
from os import path
# top level path to our bird related …
Automatic Bird Identification: Part I
Making a bird feeder that automatically identifies its visitors.
Intro
I have a bird feeder with a Raspberry Pi camera pointed at it. That raspberry pi creates a video feed of the bird feeder accessible on my local network. My local network has a Synology 918+ with a IP camera license. The Synology configured IP camera detects motion from birds (and wind unfortunately), and saves a short video of the motion events to disk.
The Plan
At first I will manually watch each motion …
Securing Django + Nginx With TLS
Encrypted good; insecure bad.
Installing Certbot
We first need to install certbot from Let's Encrypt since that will do most of the hard work for us.
sudo apt-get update
sudo apt-get install software-properties-common
sudo add-apt-repository universe
sudo add-apt-repository ppa:certbot/certbot
sudo apt-get update
sudo apt-get install certbot python-certbot-nginx
Now that certbot it installed, we can grab a certificate. We'll have daphne consume it so we don't need certbot to mess with our nginx file.
sudo certbot certonly --nginx
The tool …
Configuring MySQL for Django
How to setup MySQL for Django in Ubuntu 18.04
Installing System Packages
The first step is obviously to install MySQL itself, which is easiest to do using your systems package repository. In my case, I'm using Ubuntu 18.04 on a Digital Ocean droplet.
sudo apt-get update
sudo apt-get install mysql-server libmysqlclient-dev
Securing the Database
Now we can work on some initial setup of the new database server. Conveniently, MySQL provides a tool that walks you thru the basics of securing the installation. The …
Setting Up Django with Nginx + Daphne on Ubuntu 18.04
Serving a Django web application with Daphne and Nginx
My Environment
I'll be deploying a Django 3.0 web application on a Digital Ocean droplet running Ubuntu 18.04. The web app will be served by Daphne and Nginx.
Installing Things
Python
I'll be running Django using Python 3.8.1 which isn't currently available as a package on Ubuntu so I'll be installing it from source. The files are available on python.org.
You could use wget to download the files straight from the remote machine, but …