资源算法mobilenet-v2-custom-dataset

mobilenet-v2-custom-dataset

2020-02-28 | |  31 |   0 |   0

mobilenet-v2-custom-dataset

Using Keras MobileNet-v2 model with your custom images dataset

The Keras implementation of MobileNet-v2 (from Keras-Application package) uses by default famous datasets such as imagenet, cifar in a encoded format. But what if we want to use our own custom dataset?

The problem is that if we load all images in a single numpy array, the memory will quickly overload, that's why in this repository we use keras ImageDataGenerator class to generate batches during the runtime. The advantage of using ImageDataGenerator to generate batches instream of making a hand-made loop over our dataset is that it is directly supported by keras models and we just have to call fit_generator method to train on the batches. Moreover, we can easily activate the data augmentation option.

Our custom dataset need to have the following structure: for every class create a folder containing .jpg sample images:

dataset_folder
    class1
        image1.jpg
        image2.jpg
    class2
        image1.jpg
        image2.jpg
        image3.jpg

How to use?

  1. Configure the parameters in config.json

  2. Train the model using python train.py

  3. Evaluate the model on test dataset using: python test.py


上一篇:MobileNetV2-dynamicFPN

下一篇: Mobilenet_Jetson

用户评价
全部评价

热门资源

  • Keras-ResNeXt

    Keras ResNeXt Implementation of ResNeXt models...

  • seetafaceJNI

    项目介绍 基于中科院seetaface2进行封装的JAVA...

  • spark-corenlp

    This package wraps Stanford CoreNLP annotators ...

  • capsnet-with-caps...

    CapsNet with capsule-wise convolution Project ...

  • inferno-boilerplate

    This is a very basic boilerplate example for pe...