Posts

Showing posts from April, 2020

Qt Application Framework

Qt is a cross platform application framework. It is primarily designed for c++ coding. However, there are also various ways to access it using Python. And it is in fact quite popular as a way to build GUI interfaces for Python applications. Qt allows you to develop your application for cross platform deployment from a single code base. This is very important in todays world. It is also extremely well documented. It is available in commercial as well as open source releases. With a huge base of existing users and a vast array of legacy applications built using it, you have some assurance that it will continue on into the future in some form. It encompasses desktop applications to mobile devices to embedded and connected devices. I briefly discussed some personal history associated with developing for Qt as well as platform longevity issues you should probably think about in a previous post . Qt is currently at version 5.12 as far as long term stability releases go (5.15 planned fo...

HTC Seminar Series #3: Recent Advancements in AI algorithms and systems

Image
This weeks HTC Seminar Series presets a talk by Gil Arditi, Head of Product for Machine Learning at Lyft.  The talk focuses on recent advancements in AI algorithms and systems.  The link to the video is here . One topic to pay particular attention to is the discussion on the OpenAI GPT-2 large transformer-based language model. In a later post we will dive into a more detailed look at what GPT-2 is doing, and how it was constructed.  And how it might be used in new applications other than just text generation.

Working with Cairo in your Jupyter Notebook

Image
Cairo is a D vector graphics library that is nicely setup for both drawing to the screen or an image as well a  generating postscript, PDF or SVG output.  We'll be discussing it when we take a look at Cinder as an option for C++ application development in a later post. So i thought it would be cool to build an interface to Cairo for working with 2D graphics in Jupyter notebooks. Which i assumed meant building a Python library interface for it. And low and behold, smart people had already taken on the task. There are several different options to chose from. Let's take a look. Pycairo is the first one to look at. Python bindings for Cairo, just what the doctor ordered.  The Pycairo bindings are designed to match the cairo C API as closely as possible. Cairo itself is kind of old school C in it's api design. If you already have Cairo code you want to just use in a Python Jupyter notebook, this may be the way to go. Here's an example of how to use Pycairo. #!/usr/b...

Classic Paper Day 1: Deep Learning Review

Image
Classic paper day is an alternative to a seminar presentation. We provide a pdf link to a classic paper that ties into something HTC is interested in. Many of the recent posts have been discussing small pieces of a much bigger puzzle, putting together an infrastructure for training and then deploying custom deep learning neural networks. We're hoping to make it as easy to do as possible for our members. This paper came out when the current deep learning neural network revival really kicked into gear. It's jointly written by the holy trinity of neural network research. It's a review paper published in Nature, so it was considered very significant to end up there. You can access the Deep Learning review paper here .

Project Magenta

Deep learning neural networks have great potential as new tools for creative artists and musicians to use in their work.  Assuming they are packaged in a form that hides the underlying complexity and allows the artist to just focus on being an artist in new and interesting ways. Project Magenta is an open source research project ongoing at Google. It is exploring the role of machine learning as a tool in the creative process for artists to use.  This includes both making music as well as making visual art. Although they seem to lean more heavily towards music. There are bunch of different fun Magenta project demos you can check out. Magenta Studio is a set of music plugins that use machine learning techniques for music generation. You can run them as stand alone applicaation, or as plugins for Ableton Live, which is my personal favorite DAW (digital audio workstation) software. For developers , they offer a java script api called Majenta.js. For python oriented people...

Jupyter Notebooks

Image
Jupyter Notebooks and their underlying eco-structure the Jupyter Server and Hub are truly amazing open source software creations. So what is it? The terminal window of the future here today? An integrated programming environment. A way to run and document code experiments in a note book form. A way to distribute your code experiments to others in a way that just runs without all of the normal 'do they have the proper libraries installed on their machines' issues. Some crazy rethink of what a Mathematica notebook could be? All of the above and more. Jupyter Notebooks are an interactive environment for writing and running code. So it's an IDE (integrated Development Environment), right?  Ahhhh, not really in the normal sense of how you think of IDE's and how they usually work.  Throw away whatever metaphors bloated Visual Studio and Xcode were built off of.  'Notebook' is the new metaphor. And boy is it powerful. Your code can be in different languag...

Cython

Perhaps you come from a c++ programming background and you still have this nagging feeling in the back of your head about Python being interpreted, and how that could mess up speed performance of your code. Never fear, Cython to the rescue. Cython is an optimizing static compiler for the Python programming language. It gives you the combined power of Python and C. Cython is a superset of the python language that supports calling C functions and declaring C data types on variables and class attributes. The benefit of these added features is that it allows the compiler to generate very efficient C code from Cython code. You generate C code once, and then compile it with the C compiler of your choice. So, Cython makes it easy to wrap external C libraries in a form so that you can then use them in a Python program. Conversely, you could embed CPython code into an existing C application i believe, which is eye opening. And of course you can use it to speed up your Python code if you ...

Is Skeuomorphism outdated?

Image
Popularized in the academic community by Don Norman of all people. Donald Norman describes skeuomorphism in terms of cultural constraints: interactions with a system that are learned only through culture. Norman also popularized perceived affordances, where the user can tell what an object provides or does based on its appearance, which skeuomorphism can make easy. So what is it really? Skeuomorphism is a term most often used in graphical user interface design to describe interface objects that mimic their real-world counterparts in how they appear and/or how the user can interact with them. Think the mac trash can. It looks like one. It conceptually works like one. I would argue that the original mac finder also follows several different skeuomorphic principals. The whole xerox parc files in folders (and folders in folders) that visually look like what they should and conceptually work the same. But on a whole other level it's using physical positioning in the world...

HTC Seminar Series #2: Geoffrey Hinton: The Foundations of Deep Learning

Image
Our 2nd HTC Seminar Series continues our introduction to neural networks with a talk from 2/7/2018 by Geoffrey Hinton on the Foundations of Deep Learning. Godfather of artificial intelligence Geoffrey Hinton gives an overview of the foundations of deep learning. In this talk, Hinton breaks down the advances of neural networks, as applied to speech and object recognition, image segmentation and reading or generating natural written language. You can watch this on youtube here .

Getting Started with Kivy, Part 2

Let's continue our exploration of Kivy. Time to get our hands dirty. What do we need to do to start playing around with Kivy? Well, you are going to have to install it on your computer. And chances are you are probably going to also be installing an appropriate python version to run it. And you should probably think about what you are going to be using for your Python code editor. Like all noble programmers, you will of course strike out in the beloved Terminal and select the terminal editor of your choice... Yeah, right. Maybe you, not me. I want a decent modern IDE (integrated development environment) for writing my code.  You will probably want the same.  Just because we used terminal editors in the 70's is no reason to want to use one these days (in my humble opinion). So PyCharm by JetBrains seems like the obvious IDE choice to get going with for your Python and Kivy development. And the price is certainly right, because you get to choose. The Open Source vers...

HDF5 is your big training set helper

Image
As we have discussed before here in our ongoing explanation of deep learning system, one of the key things that helped the current deep learning neural net revolution actually move forward was access to very large training sets. Could be images, could be speech samples, could be text corpus, could be what ever you are trying to learn the statistics of with your neural net. So what is HDF5? It's a library api designed to work with very large collections of heterogenous data. It's specificlly built around fast I/O processing. It supports n-dimensional data sets. Each element in a dataset could itself be a complex object if you want it to.  It's cross platform. It's a portable format, no vender lock-in. All data and meta data can be stored in one file. The list goes on. In some sense it's like a custom file system designed for fast access to data sets that can't fit in memory. But wait, you say, i already have a file system. And it's pretty straightforw...

Automated Video Meeting AI

One of the things we're interested in here at HTC are different approaches to building AI Bots. As we seem to be diving head first as a society into virtual meetings and telepresence as a normal part of daily life. Which immediately leads you to start thinking about how AI Bots are going to integrate or hijack themselves into your daily stream. As a joke the other day i was mentioned how a certain government leader could be accurately emulated in an AI Bot by taking the repetitive speech patterns, rambling ever changing story line, etc, of their speech patterns, as well as a set of procedural animating image transformations to represent the visual part of the AI Bot. I was thinking of morphing transformations between different states in a random state machine. Well, low and behold, i wake up the next morning and someone has already done it.  Matt Reed put together a digital twin to attend Zoom conference calls in his absence. It was actually pretty straightforward.  He ...

LIDAR - Rethinking how cameras work

One cool feature of Apple's new iPad Pro tablets is that they include a new 3d sensor in the camera that utilizes LIDAR. The LIDAR sensor allows the camera to compute depth information for an image in addition to the normal 2D RGB pixel data that you get from a digital camera. So how does LIDAR  work ? LIDAR stands for Light Detection and Ranging. It uses a pulsed infrared laser to sweep a spot of light across the area that the camera is looking at. The pulsed laser light is used to measure range (the variable distance for a point in the captured 2D image). Think of it this way. Your typical digital camera gives you a 2-dimensional pixel image of a 3-dimensional space. LIDAR provides a way to get the 3-dimensional distance information for that pixel. So the digital photo is capturing and recording the depth information for the pixels of the image. Your camera is now a 3D scanner as well as a 2D imaging system. Of course it's more complicated then that, since the camer...

HTC Seminar Series #1: Geoffrey Hinton on Deep Learning

Image
HTC presents weekly seminar series on a wide variety of technical topics. Todays kick off seminar is a presentation of the May 9, 2019 Fireside Chat with Geoffrey Hinton, Pioneer of Deep Learning. One of the goals here at HTC is to promote the understanding and use of deep learning algorithms in our research and development efforts. This talk is a light overview of the field. In this rare interview since (jointly) winning the 2018 Turing Award for his work on neural networks, hear about the conceptual and engineering breakthroughs that have made deep neural networks a critical element of computing. Their research has allowed artificial intelligence technologies to progress at a rate that was not possible in the past and has reinvented the way technology is built. You can watch this on youtube here .

Utilizing cloud based GPU clusters for neural net training

The modern revolution in the development and application of deep learning neural net systems is to some extent based on the increased computational resources available today for training the deep learning nets. The availability of GPU chips being a huge factor in providing those increased computational resources. Lack of sufficient computational resource for training neural nets was the primary issue that stalled the back-prop neural net revolution that was taking place in the late 80s and early 90s.  Computers at the time were just not powerful enough to successfully train neural nets with greater than 2 or 3 layers. Once sufficient computational resources were available around 2012, approaches were developed to successfully train neural networks with many layers. This is where the term deep comes from in deep learning, deep referring to many layers in the neural network.  As we mentioned in yesterday's post on Keras,  the 2014 Simonyan and Zisserman VGG ImageNet net...

Keras API Overview

Keras is a high level neural networking api. It is written in Python. A common theme of this blog is going to be the notion that while building things from atoms is certainly possible, if you want to get things done quickly, it's better to shoot for using well thought out and developed pre-existing apis for the task you are interested in. Assuming they do exist for the problems you are trying to solve. This is definitely true when working with building deep learning neural network systems. Yes, you could set out to write your own stochastic gradient descent code, your own neural network layer code, etc, etc. But why not take advantage of pre-existing tool libraries and associated api calls. Libraries that have been extensively tested and debugged already. Keras was developed by Google research Francois Chollet. At the time it was written, the major deep learning libraries available to researchers included Torch, Theano, and Caffe. Having these tools was great, but also kind o...

Getting Started with Kivy, Part 1

Image
We're going to continue our exploration of bootstrapping your ability to do something actually useful with Python code by taking a look at two different application frameworks that can be used to build Python based applications. We'll take a look at Kivy in this post. Then we'll take a look at Qt in a later post. Why would you care about an application framework?  Well, if your goal is to sit in a terminal editor and run Python code there, maybe you don't care.  But if you are interested in building applications that other non-developer non-technical-wizard people can actually use, then finding and using the right application framework is really going to be essential. Yes, we could build everything used to construct your house by working directly with atoms. By combining atoms together, we can make the metal and wood parts you will need to construct your house. That seems like a lot of work you might be thinking. I'd rather just go to Home Depot and buy the me...