Last active
May 5, 2022 18:55
-
-
Save eddyxu/882f6e72bcfe87dd4053d1eafc823a00 to your computer and use it in GitHub Desktop.
Train on hardhat dataset
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from rikai.pytorch.data import Dataset | |
def train( | |
name: str, | |
uri: Dataset, | |
model_type: str, | |
epochs: int = 150, | |
batch_size: int = 4, | |
num_workers: int = 4, | |
lr: float = 0.02, | |
weight_decay: float = 1e-4, | |
): | |
# Training loop | |
train( | |
"hardhat", | |
data=Dataset( | |
"datasets/hardhat", | |
columns=["image", "annotations"], | |
filters=("split = 'train'"), | |
) | |
model_type="ssd", | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment