Flying memes

Author Archive

A local Q&A engine using llama and FAISS

Monday, April 1st, 2024

FAISS implements similarity search. Sentence Transformers encodes sentences into vectors FAISS can use. Llama can be configured to perform semantic searches in a FAISS vector store. By combining all of the above together we can build a local GenAI powered assistant capable of performing semantic queries to extract information from a local corpus of documents, let’s see how.

(more…)

LLaVA, Google Photo API and a broken e-book reader: Haiku digital photo frame.

Sunday, October 22nd, 2023

I’ve made a digital photo frame that displays random photo from my Google Photo library enriched with an Haiku generated by a LLaVa instance using the same photo as reference.

(more…)

Pics From The Past: ChatGPT and StableDiffusion powered facts of the day Photo Generation.

Saturday, July 8th, 2023

Wikimedia has a nice API which provides the facts of the day in JSON format, something like:

(more…)

Experimenting with my Sketches and ControlNet

Saturday, April 1st, 2023

Lately I’ve been spent some time using ControlNet to process some of my sketches, the results are quite interesting and show the potential of the technology even when the starting sketch is very low quality and noisy, due to being on squared paper.

(more…)

Can we show causation between a book genre and its quality?

Saturday, May 14th, 2022

Quality is subjective, true, but can we show that no matter the audience a fantasy book is always better than an horror book? If this would be the case it’d mean that even readers who prefer horror books should give higher ratings to an horror-fantasy book than an horror book of other sub-genres.

(more…)

Do some books categories receive on average better ratings than others?

Sunday, May 8th, 2022

Do fantasy books on average get better ratings than sci-fi books? The answer seems to be yes, according to this little data science project I’ve build from Goodreads data.

(more…)

In Browser Real Time Object Detection From an HTTP Live Stream

Friday, July 2nd, 2021

This experiment combines hsl.js and tensorflow.js to perform real time object detection from a browser. When the mouse hovers the canvas the entire stream is shown, with the detected object framed in a black box, otherwise only the parts of the stream corresponding to detected objects are displayed.

(more…)

A simple web based classifier-powered glyph detector.

Sunday, September 27th, 2020

In these days I’m spending some time reading about machine learning. To practice what I’ve read I’ve built a super simple, but working, glyph classifier, that recognizes the first five letters of the alphabet when drawn on an HTML canvas. You can try it here and check its source code on github.

(more…)

Plotting the characteristic polynomial of a matrix

Wednesday, June 28th, 2017

Next step is determining the roots of the characteristic polynomial of a matrix. Before working on extracting the roots using Newton’s method I wanted to be able to visualize the function.

(more…)

Determinant of a matrix in JS

Saturday, June 10th, 2017

I’m currently reading Deep Learning, from Ian Goodfellow, Yoshua Bengio and Aaron Courville. While reading I got interested in calculating the determinant of a square matrix, I know there are many existing libraries to do that but the algorithm looked simply enough to give it a try.

(more…)