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
taskname: '+ MobileViTv2-2.0 plant' | |
common: | |
enable_coreml_compatible_module: true | |
results_loc: "conv" | |
run_label: "finetune_mobilevit_plants" | |
mixed_precision: true | |
conversion: | |
input_image_path: "/home/nme/WORK/plants_and_shrooms/plants_images/6541/a177a8d425913fac10075c76bc8332a0ad83d04eDsc_0063.jpg" | |
dataset: | |
category: "classification" |
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
import functools | |
import inspect | |
def run_job_in_background(func, args, kwargs): | |
print(f"RUN {func} background") | |
func() | |
def background(func=None, *, commit=False): |
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
[[source]] | |
url = "https://pypi.org/simple" | |
verify_ssl = true | |
name = "pypi" | |
[packages] | |
tensorflow = "==1.15.0" | |
mxnet-mkl = "==1.6.0" | |
numpy = "==1.18.2" | |
tensorflowjs = "==1.7.2" |
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 mxnet import metric, nd | |
class BinarySelectedStatistics(metric._BinaryClassificationMetrics): | |
def __init__(self): | |
super().__init__() | |
self.positive = 1 # default | |
self.num_inst = 0 | |
self.sum_metric = 0.0 |
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
import mxnet as mx | |
import argparse, os | |
from matplotlib import pyplot as plt | |
from gluoncv.model_zoo import get_model | |
#mx.random.seed(42) | |
# CLI | |
def parse_args(): | |
parser = argparse.ArgumentParser(description='Train a model for image classification.') | |
parser.add_argument('--classes', type=str, default=1000, | |
help='number of classes') |
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
#!/usr/bin/env python3 | |
from mxnet.gluon import data, SymbolBlock, utils | |
from gluoncv.model_zoo import get_model | |
from mxnet import nd, cpu, gpu, io, metric | |
from multiprocessing import cpu_count | |
import argparse | |
classes = ['Cl1', 'lass2', 'ass3', 'ss4'] | |
parser = argparse.ArgumentParser(description='Batch prediction') |
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
import argparse, time, logging, os,math | |
import numpy as np | |
import mxnet as mx | |
import gluoncv as gcv | |
from mxnet import gluon, nd | |
from mxnet import autograd as ag | |
from mxnet.gluon import nn | |
from mxnet.gluon.data.vision import transforms |
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 mxnet.gluon import nn | |
from gluoncv.model_zoo import get_model | |
from mxnet import image, cpu, init | |
from gluoncv.data.transforms.presets.imagenet import transform_eval | |
context = [cpu()] | |
net = get_model("network_prefix", ctx=context, pretrained=True) | |
with net.name_scope(): | |
net.output = nn.Dense(4) |
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
davs://[email protected]/webdav/someFolder |
NewerOlder