๐งโ๐ผ
This file contains hidden or 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
| export PROJECT_DIR=<YOUR PROJECT DIRECTORY> | |
| export TF_API_DIR=$PROJECT_DIR/tf-models/research | |
| export PYTHONPATH=$PYTHONPATH:$TF_API_DIR:$TF_API_DIR/slim |
This file contains hidden or 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
| tensorboard --logdir=${MODEL_DIR} |
This file contains hidden or 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
| export PROJECT_DIR=<YOUR PROJECT DIRECTORY> | |
| export MODEL_DIR=$PROJECT_DIR/models/<YOUR MODEL> | |
| export PIPELINE_CONFIG_PATH=$MODEL_DIR/pipeline.config | |
| export TF_RESEARCH_MODEL_DIR=$PROJECT_DIR/tf-models/research | |
| export NUM_TRAIN_STEPS=50000 | |
| export SAMPLE_1_OF_N_EVAL_EXAMPLES=1 | |
| # From the project/tf-models/research/ directory | |
| # Make sure you've updated PYTHONPATH |
This file contains hidden or 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
| model { | |
| ssd { | |
| num_classes: 6 | |
| image_resizer { | |
| fixed_shape_resizer { | |
| height: 300 | |
| width: 300 | |
| } | |
| } | |
| feature_extractor { |
This file contains hidden or 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
| export PROJECT_DIR=<YOUR PROJECT DIRECTORY> | |
| cd $PROJECT_DIR/models | |
| curl -L http://download.tensorflow.org/models/object_detection/ssd_mobilenet_v2_quantized_300x300_coco_2019_01_03.tar.gz -o ssd_mobilenet_v2_quantized.tar.gz | |
| tar -xvf ssd_mobilenet_v2_quantized.tar.gz | |
| rm ssd_mobilenet_v2_quantized.tar.gz |
This file contains hidden or 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
| cat <<EOT >> data/label_map.pbtxt | |
| item { | |
| id: 1 | |
| name: 'Blouse' | |
| } | |
| item { | |
| id: 2 | |
| name: 'Shorts' | |
| } | |
| item { |
This file contains hidden or 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
| python generate_tfrecord.py --csv_input=data/train_labels.csv --image_dir=data --output_path=data/train.record | |
| python generate_tfrecord.py --csv_input=data/test_labels.csv --image_dir=data --output_path=data/test.record |
This file contains hidden or 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
| """ | |
| Usage: | |
| # From tensorflow/models/ | |
| # Create train data: | |
| python generate_tfrecord.py --csv_input=data/train_labels.csv --output_path=data/train.record | |
| # Create test data: | |
| python generate_tfrecord.py --csv_input=data/test_labels.csv --output_path=data/test.record | |
| """ | |
| from __future__ import division | |
| from __future__ import print_function |
This file contains hidden or 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
| # Install Tensorflow (tensorflow-gpu for GPU) | |
| pip install tensorflow --upgrade | |
| # Install dependencies | |
| pip install Cython --upgrade | |
| pip install contextlib2 --upgrade | |
| pip install pillow --upgrade | |
| pip install lxml --upgrade | |
| pip install jupyter --upgrade | |
| pip install matplotlib --upgrade |
This file contains hidden or 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
| # Define your project name | |
| export PROJECT=FashionDetector | |
| # Under your project workspace | |
| # Create your project root directory | |
| mkdir $PROJECT | |
| cd $PROJECT | |
| # Create directory to store your model data | |
| mkdir data | |
| # Create directory to store your pre trained models and their related config files | |
| mkdir models |