This is just an example for demo.
Last updated: 3/28/2019 with TensorFlow v1.12
Please following the Quickstarts.
Basically following the installation.
https://github.com/tensorflow/models.git
Any SSH and telnet clients are fine!
Here is the version list.
$python --version
Should be "Python 3.5.5 :: Anaconda custom (64-bit)" pre-installed on DLVM.
You can also check nvidia driver version.
$cat /proc/driver/nvidia/version
$pip install tensorflow-gpu==1.12.0
$cat /usr/include/cudnn.h | grep CUDNN_MAJOR -A 2
Will show like "#define CUDNN_MAJOR 7 define CUDNN_MINOR 2 define CUDNN_PATCHLEVEL 1" cuDNN version 7.0 should be pre-installed.
$>nvcc --version
Will show like "Cuda compilation tools, release 9.0, V9.0.176" CUDA version 9.0 should be pre-installed.
$nvidia-smi
Check GPU Card info.
$pip install --user Cython
$pip install --user contextlib2
$pip install --user pillow
$pip install --user lxml
$pip install --user jupyter
$pip install --user matplotlib
From models/research
$git clone https://github.com/cocodataset/cocoapi.git
$cd cocoapi/PythonAPI
$make
$cp -r pycocotools <path_to_tensorflow>/models/research/
From tensorflow/models/research/
$wget -O protobuf.zip https://github.com/google/protobuf/releases/download/v3.0.0/protoc-3.0.0-linux-x86_64.zip
$unzip protobuf.zip
From tensorflow/models/research/
$export PYTHONPATH=$PYTHONPATH:
pwd:
pwd/slim
From tensorflow/models/research/
$python object_detection/builders/model_builder_test.py
If showing "OK" that means you successfully completed the installation!
$jupyter notebook --ip=0.0.0.0 --port=8888
Copy the URL like "http://:8888/?token=*********"
Then go to Azure portal and add inbound port rule "8888"
Go to browser and paste "http://(DNS name - copy from Azure Portal):8888/?token=***********"
Now ready to code with tensorflow!
You will get the four below.
・Annotations folder
・ImageSets folder
・JPEGImages folder
・pascal_label_map.pbtxt file
$python xml_to_csv.py
You need to split the csv file into two: train.csv and test.csv before the next step.
$python generate_tfrecord.py --csv_input=train_labels.csv --output_path=train.record --label_map_path=pascal_label_map.pbtxt
$python generate_tfrecord.py --csv_input=test_labels.csv --output_path=test.record --label_map_path=pascal_label_map.pbtxt
$python train.py --logtostderr --pipeline_config_path=sushi_resnet_101.config --train_dir=checkpoints_sushi
$python eval.py --logtostderr --pipeline_config_path=sushi_resnet_101.config --checkpoint_dir=checkpoints_sushi --eval_dir=checkpoint_sushi
$tensorboard --logdir=checkpoints_sushi --port 6008