Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel
04991fdb25
changed refs to baby-yoda
3 years ago
6e5e6cb94a
updated annotations
3 years ago
src
1e27efb038
added notebook
3 years ago
3 years ago
28b2864474
saved model
3 years ago
c93c6f995f
fixed python env
3 years ago
a68d72d34c
fixed code snippet in readme
3 years ago
a3d98abf74
updated readmy to baby yoda
3 years ago
35e8122bc1
trained model
3 years ago
4f5882fdec
added output to auto-train
3 years ago
35e8122bc1
trained model
3 years ago
a0690c7df7
saved model
3 years ago
c93c6f995f
fixed python env
3 years ago
c93c6f995f
fixed python env
3 years ago
40826f2a32
trained model
3 years ago
Storage Buckets
Data Pipeline
Legend
DVC Managed File
Git Managed File
Metric
Stage File
External File

Readme.md

You have to be logged in to leave a comment. Sign In

Baby Yoda Segmentor

Instance segmentation model for detection of the character Baby Yoda, from the Disney TV Show The Mandalorian.

Grogu Baby Yoda segmentation

Dataset

This repository depends on baby-yoda-segmentation-dataset, built as a living-dataset.

How to train

Locally

  1. Install the project dependencies with poetry

  2. Change params, code or data as needed

  3. Run

    dvc repro auto-train
    

The model will be saved in models/model.pth

Using Google Colab

  1. Open the Colab Notebook. It is also available in src/ColabNotebook.ipynb
  2. Run according to the steps

Using the model

Get the model

With DVC

In a DVC repository run:

dvc import https://dagshub.com/simon/baby-yoda-segmentor models/model.pth

Simple download

curl -O https://dagshub.com/Simon/baby-yoda-segmentor/raw/master/models/model.pth

Load and use the model

from PIL import Image
from torchvision.transforms import ToTensor

device = torch.device('cuda') if torch.cuda.is_available() else torch.device('cpu')

img = Image.open("image.png")
img_t = ToTensor()(img)
model.eval()
with torch.no_grad():
    prediction = model([img_t.to(device)])

How to contribute

  1. Fork the repository

    git clone <fork-url>
    dvc pull -r origin
    
  2. Do your changes

  3. Train the model

  4. Add a local remote to push your data

    dvc remote add --local fork <dagshub-remote-url.dvc>
    # Additional commands to set up credentials should appear on you fork homepage
    
  5. Push your code and data

    dvc push -r fork
    git add .
    git commit -m "Changes to dataset"
    git push
    
  6. Open a PR

Tip!

Press p or to see the previous file or, n or to see the next file

About

Segmentation model for Baby Yoda from the series "The Mandalorian" Showcases use of MLflow, DVC imports, and more. And it actually works

Collaborators 2

Comments

Loading...