Giter VIP home page Giter VIP logo

mlops-example-project's Introduction

MLops project

Code style: black Build Status

Pokemon image classification using Mobilenet_v2 model

Astashov I.V., 2023.

This repository contains model, evaluation code and training code on dataset from kaggle. If you would like to run pretrained model on your image see (2) Quick start.

(1) Setup

Install packages

  • This template use poetry to manage dependencies of your project. First you need to install poetry;
  • Next run poetry install and poetry shell.

(2) Quick start

Download model and optimizer

# Download model and optimizer
cd weights
bash download_weights.sh
cd ../..

Run on a single image

This command runs the model on a single image, and outputs the prediction. Put your Pokémon image into the appropriate folder photo to test.

# Model weights need to be downloaded
python inference.py

(3) Dataset

Download the dataset

A script for downloading the dataset is as follows:

# Download the dataset
cd data
bash download_data.sh
cd ../..

All the 150 Pokémon included in this dataset are from generation one. There are around 25 - 50 images for each Pokémon. All of them with the Pokémon in the center. Most (if not all) of the images have relatively high quality (correct labels, centered). The images don't have extremely high resolutions so it's perfect for some light deep learning.

If the script doesn't work, an alternative will be to download the zip files manually from the link. One can place the dataset zip files in data, respectively, and then unzip the zip file to set everything up.

PAY ATTENTION

This repository runs Data Version Control (DVC) for training and validation data. Pre-configured Google Drive remote storage stores raw input data.

$ dvc remote list
my_remote gdrive://1RXz3Mv7OxVveHtQ7c1ZtGgazDh6bPFJz

You can run dvc pull to download the data:

$ dvc pull

(4) Train and Evaluation model

Example script to train and evaluate model.

# Train ConvNet
python main.py

Hydra - hyperparameter management tool.

If you want to change hyper-parameters such as: epoch_count, lr, batch_size, momentum, then you can change them in the file conf/config.yaml.

(A) Acknowledgments

This repository borrows partially from Isadrtdinov, and FUlyankin repositories. Repository design taken from v-goncharenko, PeterWang512 and ArjanCodes.

mlops-example-project's People

Contributors

igorastashov avatar

Stargazers

 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.