Skip to content

Instantly share code, notes, and snippets.

{
"errors": [],
"meta": {
"namespace": "bay_no_bay"
},
"models": {
"new_model": {
"model_id": "5829572617468274221",
"version": 14
},
{
"errors": [],
"meta": {
"namespace": "bay_no_bay",
"model_id": "7581439787192873",
"time_taken_in_ms": 1432000
},
"metrics": {
"f1": {
"whole": 0.781,
{
"errors": [],
"meta": {
"namespace": "bay_no_bay",
"model_id": "7581439787192873",
"time_taken_in_ms": 1432000
},
"metrics": {
"f1": {
"whole": 0.781,
{
"errors": [],
"meta": {
"namespace": "bay_no_bay",
"model_id": "7581439787192873",
"time_taken_in_ms": 1432000
},
"metrics": {
"f1": {
"whole": 0.781,
{
"errors": [],
"meta": {
"namespace": "bay_no_bay",
"model_id": "1480239148109284",
"time_taken_in_ms": 120000
},
"predictions": {
"gs://<image1_uri>": ["bay", "no_bay"],
"gs://<image2_uri>": ["no_bay", "bay"],
@jnyjxn
jnyjxn / Example POST request body for ML gateway.json
Last active November 3, 2021 17:27
Example inputs and outputs of the Captur Machine Learning Engine
{
"meta": {
"images_csv": "<GCS_path_to_imagenames>.csv",
"labels_manifest": "<GCS_path_to_labels_manifest>.json"
},
"train": {
"meta": {},
"models": {
"<my_brand_new_model>": {
"type": "image_label"
augmentation_transforms = get_data_augmentation(cfg)
from torchvision.transforms import (
Compose,
CenterCrop,
# ...
ToTensor,
)
def get_data_augmentation(cfg):
# This dictionary converts the 'name' key into a class constructor
transform_dict = {
from torchvision.transforms import (
Compose,
CenterCrop,
ToTensor
)
augmentation_transforms = Compose([
CenterCrop(size=10),
ToTensor(),
])
augmentation:
training: [
{
name: CentreCrop,
size: 10
},
{
name: ToTensor,
}
]