Check the preview of 2nd version of this platform being developed by the open MLCommons taskforce on automation and reproducibility as a free, open-source and technology-agnostic on-prem platform.
program:image-classification-resnet-50-cntk (v3.0.0)
Copyright: See copyright in the source repository
License: See license in the source repository
Creation date: 2018-08-09
Source: GitHub
cID: b0ac08fe1d3c2615:0f7bf209cd44b505

Don't hesitate to get in touch if you encounter any issues or would like to discuss this community project!
Please report if this CK component works: 1  or fails: 0 
Sign up to be notified when artifacts are shared or updated!

Description  

This portable workflow is our attempt to provide a common CLI with Python JSON API and a JSON meta description to automatically detect or install required components (models, data sets, libraries, frameworks, tools), and then build, run, validate, benchmark and auto-tune the associated method (program) across diverse models, datasets, compilers, platforms and environments. Our on-going project is to make the onboarding process as simple as possible via this platform. Please check this CK white paper and don't hesitate to contact us if you have suggestions or feedback!
  • Automation framework: CK
  • Development repository: ck-ml
  • Source: GitHub
  • Available command lines:
    • ck run program:image-classification-resnet-50-cntk --cmd_key=train (META)
  • Support for host OS: any
  • Support for target OS: any
  • Tags: image-classification,cntk-image-classification
  • How to get the stable version via the client:
    pip install cbench
    cb download program:image-classification-resnet-50-cntk --version=3.0.0 --all
    ck run program:image-classification-resnet-50-cntk
  • How to get the development version:
    pip install ck
    ck pull repo:ck-ml
    ck run program:image-classification-resnet-50-cntk

  • CLI and Python API: module:program
  • Dependencies    

    ReadMe  

    ImageClassification-ResNet-CNTK

    This folder contains the CNTK python implementation of the ResNet model. The original official repo is here.

    Prepare Dataset

    The original directory of CNTK ResNet contains code for cifar10 and imagenet datasets. In our benchmark, we use the imagenet1K dataset.

    To use our benchmark, first prepare the dataset according to the following steps:

    1, Download and decompress the imagenet1K 2012 dataset. Note that you need to sign up for an account at image-net.org to download the dataset. Rename and move your deceompressed directories so that the raw data folder looks like this:

    ImageNet1K/
        ImageNet_train/
            n01440764/
            n01443537/
            n01484850/
            ...
        ImageNet_val/
            ILSVRC2012_val_00000001.JPEG
            ILSVRC2012_val_00000002.JPEG
            ILSVRC2012_val_00000003.JPEG
            ...
    

    2, Copy dataset/Read_labelclsloc.py & dataset/create_train_map.py to ImageNet1K/ImageNet_train/, and dataset/ILSVRC2012_validation_ground_truth.txt & dataset/create_val_map.py to ImageNet1K/ImageNet_val/

    3, Generate train_map.txt and val_map.txt by:

    DATA_DIR=<ABS_PATH_TO_ImageNet1K/ImageNet_train/>
    cd $DATA_DIR
    python3.5 create_train_map.py $DATA_DIR
    cd ../ImageNet_val
    python create_val_map.py
    

    Get CNTK Executable

    Currently we provide CNTK BrainScript supported by CNTK-2.0. We will update to latest version of CNTK in future release.

    To train the model with CNTK BrainScript, obtain the CNTK executable by following:\ 1, Install open MPI by sudo apt-get install libopenmpi-dev;\ 2, Download and decompress CNTK-2.0 GPU version for Linux here. To use other version, check here (Please download the release, not the source code);\ 3, Add dependency libs to the environment by:

    export LD_LIBRARY_PATH=LD_LIBRARY_PATH:<PATH/TO/cntk/cntk/dependencies/lib>
    

    4, You should find the cntk executable in <PATH/TO/cntk/cntk/bin/cntk>.

    Run Training

    To start the training of ResNet-50 with mini-batch size x with CNTK BrainScript, you need to:\ 1, Change the DataDir variable in source/BrainScript/ResNet50_ImageNet1K.cntk to <ABS_PATH_TO_ImageNet1K/ImageNet_train/>;\ 2, Modify the minibatchSize variable to x;\ 3, start the training by:

    <PATH/TO/cntk/cntk/bin/cntk> configFile=ResNet50_ImageNet1K.cntk
    

    To train ResNet-152, change the DataDir & minibatchSize variables accordingly, then start the training by:

    <PATH/TO/cntk/cntk/bin/cntk> configFile=ResNet152_ImageNet1K.cntk
    

    Versions  

    Comments  

    Please log in to add your comments!
    If you notice any inapropriate content that should not be here, please report us as soon as possible and we will try to remove it within 48 hours!