Solving a segmentation problem for the AI&ML exam at University of Verona. Group formed by a colleague of mine and me. You can find the dataset and the github repo.

Technical report

Here you can find a technical report with all the details, tests, results and conclusions of the project. Take a look at it!

Dataset

The dataset is composed by 366 images and the corresponding masks. For the images we have essentially three problems: the images have different sizes, the dataset is quite small and finally there are a lot of different light conditions, contrast and content. You can find some examples below:


Test the model trained previously on a aws ec2 instance. More details here

Result

curl -w '\n' -F image=@helmet.jpg http://ip:8080/predict -w "\n %{time_connect}:%{time_starttransfer}:%{time_total} \n"
It works, not so pretty to visualize. Let’s see the response

Speed up aws sam build with container image

For all the details, take a look at this feature request


I never used the Yolo network so I test it on NFL dataset

Result of the helmets detection

Useful material

Github page and the official docs

Notebook

In the following section I will post the most important parts of the notebook, some considerations and the results.

How to custom train the network

The most important thing when using the Yolov5 (for training the custom datset) is to understand how to setup the folder structure.


I was reading Practical Deep Learning for Cloud, Mobile, and Edge and I wanted to try a simple reverse image search on Caltech 256 with Tensorflow on Kaggle.

Idea

The idea is to take a pre-trained model (ResNet50) and eliminate the fully connected layer. Indeed, the last layer now become a conv layer with dimension 2048. This is called feature list or embedding.

Now, images that are similar have also similar embedding. In order to find this similarity there are several method: here we use Knn and, moreover, we make a comparison of the speed with annoy.

Dataset Preparation & model

I’ve used Kaggle with…


This is the some results from my advanced databases & information system exam.

Dataset

It contains tweets and users information from 29/1/2020 to 7/03/2020. The total size is 6,1 GB.


Using Kaggle dataset to gain experience with LSTM and text processing.

Here, you’ll find Stack Overflow quality ranking based on a model that takes multi-input (title, body and tags of the question) and process it with LSTM using Keras.

Here I will put the most relevant parts of the code. For the complete one, look at the Colab file at the end of the article.

Dataset

You can find it on Kaggle.

We collected 60,000 Stack Overflow questions from 2016–2020 and classified them into three categories: HQ (high quality), LQ_EDIT (low quality but still open), LQ_CLOSE (low quality — close…


Today you will see how the convolutional layers of a CNN transform an image. Moreover, you’ll see that as we go higher on the stacked conv layer the activations become more and more abstracts.

For doing this, I created a CNN from scratch trained on ‘cats_vs_dogs’ dataset taken from TensorFlow datasets page

Here you will find the most useful parts of the code. For the complete Jupyter notebook, take a look at the link at the bottom page.

Ok, let’s start!

Import and pre-processing

import tensorflow as tf
import tensorflow_datasets as tfd

Get the data

# load dataset
(train, validation), metadata…


Before starting, here the final result

Correctly, the first file is uploaded. The second return an error because there is a file with the same name

Prerequisites

I assume you are familiar with Laravel (in this case version 5.x) and you have already a laravel webapp installed with dropzone js imported in your upload page (follow the installation guide from the link)

Moreover, you’ll find the code as images only for ease of reading. You can find it to paste on the bottom of the article!

Before starting, let’s see the workflow and some detail to better understand the code:

  • File model with some basic attributes as file_name, path and folder
  • Upload page that upload under a specific folder (can be…

Francesco

Master’s degree in Computer Engineering for Robotics and Smart Industry — Smart Systems & Data Analytics

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store