Git Product home page Git Product logo

mldl_rfikt_master_2's Introduction

MLDL Course Labs

This repository contains all the work I managed to accomplish during the Machine Learning / Deep Learning course in 2019.


Lab 1.

The first task was a classification problem that had to be solved with the kNN algorithm on the MNIST Fashion dataset. It had to be built in tensorflow and executed in graph mode. The full solution can be found in ./lab_1.

Lab 2 - ...

The second task was the first part of a bigger problem: object detection for brand recognition.

  • Dataset

The objects that I've been trying to detect were the Alpen Gold choco bars.

To train the detection model I made ~200 photos of shelves with different kinds of chocolate bars in various grocery stores in Minsk. After that I manually labeled the bounding boxes of the desired objects using LabelMe. The images and their annotations can be found here.

  • Data processing

In order to use the convenient tensorflow object detection API the data had to be converted into the appropriate format - tfrecords.

For this the raw data and the annotations had to be first converted to either csv or coco format and then to the tfrecords format.

  • Model

The model that has been trained for detection was a pretrained Faster RCNN Inception V2. It was trained on ~140 images, tested and then validated on ~30 images each. The complete training configuration with the optimizer, learning rate schedule, augmentation options and other parameters settings. can be found here.

After 95k training steps the model achieved mean Average Precision of 0.8 on test the test images (with IoU=0.75). Here are some examples of the detected choco bars:

example1

example2

Usage

In order to reproduce the results or to run the scripts with a different dataset you can use the following commands

  1. Convert the raw images and annotations to coco format (assumes that the data is stored in the same way as in this repo):
$ make coco
  1. Convert the coco formatted data to a set of sharded tfrecords files:
$ make tf_records_coco
  1. Train the model from the predefined config using the tfrecords from step 2:
$ make train

The training process can be visualized using tensorboard:

$ tensorboard --logdir=./choco

CSV formatted data usage is WIP.

mldl_rfikt_master_2's People

Contributors

ivanklimuk avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.