python

Howto run Stable Diffusion Text2Image Generator locally on an M1 Mac

#blog #howto #python #tensorflow #ml #maschine learning #keras #text2image #macos

Text2Image generators like Dall-E or Midjourney are the new hot dudes, when it comes to generating images just from text inputs and also sparked some serious discussions about certain professions might getting obsolete, like artists and photographers. To be honest, it is extremly impressive what these generators can do, but on the other hand they do not replace a photographer for your weddding. Nevertheless I absolutly see practical applications for Text2Image generators.

 

A RaspberryPi Pico To-Do board using Micropython

#blog #howto #raspberrypi #raspberrypi pico #python #micropython #electronics #programming #iot #microcontroller

Sometimes I need a little visual hint to do things, especially when it comes to little things that I should do on repeat, like dayli or even multiple times per day. I’m not really someone who does a lot of sport, but I love to go bouldering. In my “best times” I went three times every week. A few weeks ago I injured my left leg and since then I was not able to go to the bouldering gym anymore.

 

Using a Tensorflow/Keras multi-input model and NLTK to train a simple chatbot

#blog #howto #python #tensorflow #ml #maschine learning #keras

In this example we will build a very simple chatbot, which we will train on pre-defined questions and answers. This approach is very simple, but in fact could be used to build a chatbot that allows users to talk about a limited scope. So basically you could use this as a different way for users to search your FAQs or allow users to get information usually found in your service documentation or even your product offerings, opening hours and menu of your restaurant and so on, by simply asking.

 

Using regression to predict house prices using Tensorflow and Keras

#blog #howto #python #tensorflow #ml #maschine learning #keras

In this example we will use the Boston housing price dataset to predict house prices based on several features such as crime rate, local tax property rate and so on. The biggest difference to the previous examples here is that we do not predict fixed classes. This time we predict a continous value. Prequesites This is the third part of my Tensorflow and Keras Sample series. To better understand what is going on here, I highly recommend to read part 1 and part 2 first and then return here to continue.

 

Multiclass classification with Tensorflow and Keras functional API

#blog #howto #python #tensorflow #ml #maschine learning #keras

In the first part of this series we developed a simple binary classification model using Keras' Sequential model class, which is the easiest way of using Keras. Since the Squential model is easy to use, but also limited in what we can do with it, we will use Keras' functional API from now on. That way we can build more complex models for use cases that are not so simple. Allthough in this example we will basically use the functional API to build a model that could also be build using the Sequential model to show how it works on with a very simple example and then use this in upcoming parts of this series to implement more complex usecases.

 

Simple binary classification with Tensorflow and Keras

#blog #howto #python #tensorflow #ml #maschine learning #keras

This is the first of - hopefully - a lot of Tensorflow/Keras tutorials I will write on this blog. In this first - very simple - example I will demonstrate how to use Tensorflow and Keras to train and use a model to predict if an IMDB movie review is positiv or negative. We will use the IMDB dataset for this, prepare the training data, so we can use it to train the model, and finally make predictions on data the model has never seen before.

 

Setup Tensorflow Environment on M1 Mac

#blog #howto #mac #macos #python #apple #tensorflow #ml #maschine learning

Since Apple’s M1 chip is a really good choice for maschine learning at home, but the setup of a Tensorflow environment isn’t exactly straight forward, I thought it would make sense to simplify it a little bit and write a short guide on how to do it. What we need and what the finished solution will look like We need an Apple device with a M1, M1 Pro or Max chip and macOS 12.

 

Raspberry Pi Pico as HID

#blog #howto #raspberrypi #raspberrypi pico #python #circutpython #electronics #programming #iot #microcontroller

Ever wanted to build a custom controller, or a have a few buttons which you could map some shortcuts to? Then the RaspberryPi Pico and a few touch buttons are everything you need. The Pico can be used as a HID (Keyboard, Mouse or MediaController) by using Adafruit’s HID library. The only problem here is that you can not use it using Micropython, but if we setup the Pico to run Circutpython we are good to go.

 

RaspbeeryPi Pico Temperature Light and Logger

#blog #howto #raspberrypi #raspberrypi pico #python #micropython #electronics #programming #iot #microcontroller

On a rainy sunday afternoon I found out that the RaspbeeryPi Pico fits perfectly into a 35mm film box if you cut a little hole for the USB port into the lid. Since my box was a semi-transparent white box, I decided to add some LEDs and build a little temperature sensor, that indicates the current temperature range using either a blue, green, orange or red LED. Build I connected the power pin (long side) of each LED to a GPIO port (green = Pin4, blue = Pin5, orange = Pin3, red = Pin2), of course with a 220 ohm resistor in between, and all the short sides to GND.

 

How to develop on a RaspberryPi Pico using Micropython

#blog #howto #raspberrypi #raspberrypi pico #python #micropython #electronics #programming #iot #microcontroller

A few days ago I got two brand new RaspberryPi Pico Boards and so it is time to build something using this new toy. So let’s talk about what it actually is, how to setup a MicroPython development environment and also build a simple example project to make sure everything works as expected. This one is not like the others I won’t go to much into the specs of this board, since you can read them for yourself here, instead I will focus here on two specific things that set’s this Pi appart from others like it.