This post covers a bit of an old project, but I wanted to write about how I made my 3.5mm audio switch. The goal of this project was to make an audio switch that had multiple inputs and multiple outputs. At the time, I could not find a commercial product that did this, and similar DIY projects only had multiple inputs and a single output rather than numerous inputs and outputs.
I started this project by making a wiring schematic.
Let’s jump right into the fun and start making pixel art with Open CV. Before you read this article, consider checkout out these articles:
Like most CV projects, we need to start by importing some libraries and loading an image.
# Open cv library
import cv2
# matplotlib for displaying the images
from matplotlib import pyplot as plt
img = cv2.imread('dolphin.jpg')
Generative adversarial networks (GAN) are all the buzz in AI right now due to their fantastic ability to create new content. Last semester, my final Computer Vision (CSCI-431) research project was on comparing the results of three different GAN architectures using the NMIST dataset. I’m writing this post to go over some of the PyTorch code used because PyTorch makes it easy to write GANs.
This post dives headfirst into PyTorch: a powerful open-source ML library for Python. Google’s flagship ML library is TensorFlow, whereas Facebook developed PyTorch. Researchers are gravitating towards PyTorch due to its flexibility and efficiency. This tutorial goes over the basics of PyTorch, including tensors and a simple perceptron. This tutorial requires knowledge of Python, Numpy, and neural networks. If you don’t know anything about neural networks, I suggest that you watch this amazing video by 3Blue1Brown:
Let’s get right into this post! Before you read this post, be sure to check out my original post on word embeddings. In this post, we will be using data from this blog to create and visualize a word embedding.
To recap, let’s first examine a small example using the Gensim Word2Vec model:
from gensim.models import Word2Vec
# defines some dummy data
sentences = [["cat", "say", "meow"], ["dog", "say", "woof"], ["man", "say", "dam"]]
# creates and trains model
model = Word2Vec(min_count=1, size=10)
model.build_vocab(sentences)
model.train(sentences, total_examples=model.corpus_count, epochs=model.epochs)
# saves the model so that you can load it later with model.load
model.save("basic-word2vec.model")