Breta Hajek

All my activities in one place–mostly dev stuff.

bretahajek.com

Category: Tutorial

Using Memory Techniques for Exams and Studying

You may or may not heard about memory techniques―using memory palaces to memorize a lot of information quickly. However, most of the articles deal with memorizing numbers, cards or lists of random objects. As accurate as this information is, it is often presented in a very unpractical way. In this article, I would like to describe how I use these techniques in my student’s life.

“You can memorize
a deck of cards,
so what?!”

Read More

Using Combined Adversarial Loss in TensorFlow GANEstimator

This will be a quick tip on how to use combine_adversarial_loss in tf.contrib.gan.estimator.GANEstimator. In my latest projects, I have been using TensorFlow estimators. Estimators allow you to focus more on creating models and wraps the whole training (including saving, exporting, and putting a model in production) into few lines. Recently, I experienced the limits of estimators when I wanted to train a generative adversarial network (GAN) with a combined adversarial loss. In this article, I will show you a little trick how to do that.

TF tricks #1 Using GANs

Read More

Importing Multiple TensorFlow Models (Graphs)

Updated 6th March 2018: importing operations by name.

There are a lot of great things about TensorFlow. BUT once I figure out how to import my trained model (graph), I wasn’t able to import second model and use it alongside with the first one. The importing is pretty slow and I don’t want to do it more than once. On the other hand, squashing everything into one model seems to me pretty impractical.

In this tutorial, I will show how to save and import TensorFlow model. Even more, how to import multiple models alongside.

Importing multiple TensorFlow Graphs

Read More

Widgets for Jupyter, ipwigdets

I have worked with Jupyter for a while and I must say that it is a pretty unique experience. The ability to get outputs right away and visualize the data right beneath the code create a great environment for data analysis. And you can also install Vim key binding 😉. But there is even more! There are widgets — buttons, sliders, drop-down menus, and more — that allows interactive interactions and make your code even more fun. For example, I use widgets for creating simple UI for classifying images and creating a data set.

Using interact from ipywidgets

Using interact from ipywidgets

Read More

Scanning Documents from Photos Using OpenCV

During my project I came across this problem: How to detect paper page on the photo and cut it out. There are already mobile apps providing this feature, but we could definitely learn something by building it and maybe even improve it. Even though this problem may seem complicated at first, the OpenCV can help us a lot and reduce the whole problem on a few lines of code. So, today I will give you a quick tutorial how to solve such a problem.

Page Detection (Scanning), using OpenCV

Read More

Jupyter Notebook with OpenCV on Android, Machine Learning

Seriously! I successfully installed Jupyter Notebook with OpenCV on my Android NO-ROOT tablet. This may sound crazy and useless, but I why not? The performance of the tablets these days is exaggerated — thanks game industry — so let’s use it for something meaningful. Personally, I have a solid tablet, but I never really used it. And that will change!

Tutorial is up to date with GNURoot Debian app version 0.6.8.

Android with Jupyter notebook OpenCV - Machine Learning

I really works! Jupyter notebook on Android

Read More

Electron Builder with AppVeyor and Travis CI, Memory King

I decided to repair the Travis CI build. What started as a small fix end up as setting up the whole automatic release system connected with GitHub releases. It sounds really cool, but the truth is that the electron-builder provided everything what we need. Then our task is “only” to set up everything correctly. So, today I will give you a step by step guide.

GitHub Draft Release

Read More

Břetislav Hájek © 2015-2019