|
1 month ago | |
---|---|---|
.dvc | 1 month ago | |
data | 1 month ago | |
models | ||
src | 1 month ago | |
.dvcignore | 1 month ago | |
.gitignore | 1 month ago | |
.python-version | 1 month ago | |
Readme.md | 1 month ago | |
baby-yoda-preview.png | 1 month ago | |
dvc.lock | 1 month ago | |
dvc.yaml | 1 month ago | |
metrics.csv | 1 month ago | |
params.yml | 1 month ago | |
poetry.lock | 1 month ago | |
pyproject.toml | 1 month ago | |
requirements.txt | 1 month ago |
Legend |
---|
DVC Managed File |
Git Managed File |
Metric |
Stage File |
External File |
Legend |
---|
DVC Managed File |
Git Managed File |
Metric |
Stage File |
External File |
Instance segmentation model for detection of the character Baby Yoda, from the Disney TV Show The Mandalorian.
This repository depends on baby-yoda-segmentation-dataset, built as a living-dataset.
poetry
dvc repro auto-train
The model will be saved in models/model.pth
src/ColabNotebook.ipynb
In a DVC repository run:
dvc import https://dagshub.com/simon/baby-yoda-segmentor models/model.pth
curl -O https://dagshub.com/Simon/baby-yoda-segmentor/raw/master/models/model.pth
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)])
Fork the repository
git clone <fork-url>
dvc pull -r origin
Do your changes
Train the model
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
Push your code and data
dvc push -r fork
git add .
git commit -m "Changes to dataset"
git push
Open a PR