资源简介

针对k210或者其他AI嵌入式设备提供转化代码,支持训练、优化、转化相关内容,提供端到端的模型训练和转换。

资源截图

代码片段和文件信息

import argparse
from axelerate import setup_training setup_inference
from keras import backend as K 

argparser = argparse.ArgumentParser(description=‘Test axelerate on sample datasets‘)

argparser.add_argument(
    ‘-t‘
    ‘--type‘
    default=“all“
    help=‘type of network to test:classifierdetectorsegnet or all‘)

args = argparser.parse_args()

def configs(network_type):

#classifer type:
#    Full Yolo
#    Tiny Yolo
#    MobileNet1_0
#    MobileNet7_5
#    MobileNet5_0
#    MobileNet2_5
#    SqueezeNet
#    VGG16
#    ResNet50

    classifier = {
        “model“ : {
            “type“:                 “Classifier“
            “architecture“:         “MobileNet1_0“
            “input_size“:           224
            “fully-connected“:      [10050]
            “labels“:               []
            “dropout“ :  0.5
        }
        “weights“ : {
                “full“:    ““
                “backend“:        “imagenet“
                “save_bottleneck“:      False
        
        }
        “train“ : {
            “actual_epoch“:         5
            “train_image_folder“:   “sample_datasets/classifier/imgs“
            “train_times“:          1
            “valid_image_folder“:   “sample_datasets/classifier/imgs_validation“
            “valid_times“:          1
            “valid_metric“:         “val_accuracy“
            “batch_size“:           4
            “learning_rate“:        1e-4
            “saved_folder“:   “classifier“
            “first_trainable_layer“: ““
            “augumentation“:True
        }
        “converter“ : {
            “type“:   [“tflite““k210“]
        }
    }


    detector = {
        “model“:{
            “type“:                 “Detector“
            “architecture“:         “MobileNet7_5“
            “input_size“:           [320 240]
            “anchors“:              [0.57273 0.677385 1.87446 2.06253 3.33843 5.47434 7.88282 3.52778 9.77052 9.16828]
            “labels“:               [“aeroplane““person““diningtable““bottle““bird““bus““boat““cow““sheep““train“]
            “coord_scale“ :  1.0
            “class_scale“ :  1.0
            “object_scale“ :  5.0
            “no_object_scale“ :  1.0
        }
        “weights“ : {
            “full“:    ““
            “backend“:        None
        }
        “train“ : {
            “actual_epoch“:         5
            “train_image_folder“:   “sample_datasets/detector/imgs“
            “train_annot_folder“:   “sample_datasets/detector/anns“
            “train_times“:          1
            “valid_image_folder“:   “sample_datasets/detector/imgs_validation“
            “valid_annot_folder“:   “sample_datasets/detector/anns_validation“
            “valid_times“:          1
            “valid_metric“:         “mAP“
            “batch_size“:           2
            “learning_rate“:        1e-4
    

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2020-07-31 03:37  aXeleRate\
     文件        4660  2020-07-21 10:15  aXeleRate\tests_training_and_inference.py
     文件         723  2020-07-21 10:15  aXeleRate\setup.py
     文件         126  2020-07-21 10:15  aXeleRate\requirements.txt
     文件        5935  2020-07-21 10:15  aXeleRate\README.md
     文件        1070  2020-07-21 10:15  aXeleRate\LICENSE
     文件         205  2020-07-21 10:15  aXeleRate\.gitignore
     文件        4842  2020-07-30 08:29  aXeleRate\mytest.py
     目录           0  2020-07-30 10:58  aXeleRate\.idea\
     文件         715  2020-07-30 07:44  aXeleRate\.idea\aXeleRate.iml
     文件         270  2020-07-30 07:41  aXeleRate\.idea\modules.xml
     文件         295  2020-07-30 07:44  aXeleRate\.idea\misc.xml
     文件       18714  2020-07-30 10:58  aXeleRate\.idea\workspace.xml
     目录           0  2020-07-30 08:13  aXeleRate\axelerate\
     文件        7906  2020-07-21 10:15  aXeleRate\axelerate\train.py
     文件          70  2020-07-21 10:15  aXeleRate\axelerate\__init__.py
     文件        7425  2020-07-30 08:13  aXeleRate\axelerate\infer.py
     目录           0  2020-07-30 03:54  aXeleRate\.github\
     文件         676  2020-07-21 10:15  aXeleRate\.github\FUNDING.yml
     目录           0  2020-07-30 03:54  aXeleRate\sample_datasets\
     目录           0  2020-07-30 07:03  aXeleRate\resources\
     文件       88025  2020-07-21 10:15  aXeleRate\resources\n02106550_7003.jpg
     文件        9207  2020-07-21 10:15  aXeleRate\resources\logo.png
     文件        9867  2020-07-21 10:15  aXeleRate\resources\aXeleRate_test_segnet.ipynb
     文件       10292  2020-07-21 10:15  aXeleRate\resources\aXeleRate_test_detector.ipynb
     文件        8776  2020-07-30 07:03  aXeleRate\resources\aXeleRate_test_classifier.ipynb
     文件       13883  2020-07-21 10:15  aXeleRate\resources\aXeleRate_standford_dog_classifier.ipynb
     文件       12085  2020-07-21 10:15  aXeleRate\resources\aXeleRate_person_detector.ipynb
     文件       15312  2020-07-21 10:15  aXeleRate\resources\aXeleRate_pascal20_detector.ipynb
     文件       11770  2020-07-21 10:15  aXeleRate\resources\aXeleRate_mark_detector.ipynb
     文件       13631  2020-07-21 10:15  aXeleRate\resources\aXeleRate_human_segmentation.ipynb
............此处省略250个文件信息

评论

共有 条评论