Skip to content

Commit

Permalink
created symbolic link to data/networks to save disk space
Browse files Browse the repository at this point in the history
  • Loading branch information
dusty-nv committed Apr 1, 2017
1 parent 237b277 commit 6e3733b
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 21 deletions.
16 changes: 10 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,16 @@ foreach(include ${inferenceIncludes})
endforeach()


# copy network data
file(GLOB networkData ${PROJECT_SOURCE_DIR}/data/networks/* ${PROJECT_SOURCE_DIR}/data/images/*)

foreach(include ${networkData})
message("-- Copying ${include}")
file(COPY ${include} DESTINATION ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
# create symbolic link for network data
execute_process( COMMAND "${CMAKE_COMMAND}" "-E" "create_symlink" "${PROJECT_SOURCE_DIR}/data/networks" "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/networks" )


# copy image data
file(GLOB imageData ${PROJECT_SOURCE_DIR}/data/images/*)

foreach(image ${imageData})
message("-- Copying ${image}")
file(COPY ${image} DESTINATION ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
#configure_file(${include} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} COPYONLY)
endforeach()

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
![Alt text](https://a70ad2d16996820e6285-3c315462976343d903d5b3a03b69072d.ssl.cf2.rackcdn.com/841b9209217f74e5992b8d332c612126)
# Deploying Deep Learning
Welcome to NVIDIA's guide to deploying inference and our embedded deep vision runtime library for **[Jetson TX1/TX2](http://www.nvidia.com/object/embedded-systems.html)**.
Welcome to our guide to deploying inference and embedded [deep vision](https://rawgit.com/dusty-nv/jetson-inference/master/docs/html/index.html) runtime library for **[NVIDIA Jetson TX1/TX2](http://www.nvidia.com/object/embedded-systems.html)**.

Included in this repo are resources for efficiently deploying neural networks into the field using NVIDIA **[TensorRT](https://developer.nvidia.com/tensorrt)**.

Expand Down
6 changes: 3 additions & 3 deletions detectNet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@
detectNet* detectNet::Create( NetworkType networkType, float threshold )
{
if( networkType == PEDNET_MULTI )
return Create("multiped-500/deploy.prototxt", "multiped-500/snapshot_iter_178000.caffemodel", "multiped-500/mean.binaryproto", threshold );
return Create("networks/multiped-500/deploy.prototxt", "networks/multiped-500/snapshot_iter_178000.caffemodel", "networks/multiped-500/mean.binaryproto", threshold );
else if( networkType == FACENET )
return Create("facenet-120/deploy.prototxt", "facenet-120/snapshot_iter_24000.caffemodel", NULL, threshold );
return Create("networks/facenet-120/deploy.prototxt", "networks/facenet-120/snapshot_iter_24000.caffemodel", NULL, threshold );
else /*if( networkTYpe == PEDNET )*/
return Create("ped-100/deploy.prototxt", "ped-100/snapshot_iter_70800.caffemodel", "ped-100/mean.binaryproto", threshold );
return Create("networks/ped-100/deploy.prototxt", "networks/ped-100/snapshot_iter_70800.caffemodel", "networks/ped-100/mean.binaryproto", threshold );
}


Expand Down
2 changes: 1 addition & 1 deletion docs/doc-groups.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

/**
* @defgroup deepVision Deep Vision Primitives
* Runtime APIs for supporting deep vision network model primitives and inferencing with TensorRT.
* C++ runtime APIs for supporting deep vision network model primitives and inferencing with TensorRT.
* Available network primitives currently include:
* - \ref imageNet for image recognition
* - \ref detectNet for object detection + localization
Expand Down
6 changes: 3 additions & 3 deletions imageNet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,8 @@ bool imageNet::loadClassInfo( const char* filename )
// init
bool imageNet::init( imageNet::NetworkType networkType, uint32_t maxBatchSize )
{
const char* proto_file[] = { "alexnet.prototxt", "googlenet.prototxt" };
const char* model_file[] = { "bvlc_alexnet.caffemodel", "bvlc_googlenet.caffemodel" };
const char* proto_file[] = { "networks/alexnet.prototxt", "networks/googlenet.prototxt" };
const char* model_file[] = { "networks/bvlc_alexnet.caffemodel", "networks/bvlc_googlenet.caffemodel" };

/*
* load and parse googlenet network definition and model file
Expand All @@ -154,7 +154,7 @@ bool imageNet::init( imageNet::NetworkType networkType, uint32_t maxBatchSize )
*/
mOutputClasses = mOutputs[0].dims.c;

if( !loadClassInfo("ilsvrc12_synset_words.txt") || mClassSynset.size() != mOutputClasses || mClassDesc.size() != mOutputClasses )
if( !loadClassInfo("networks/ilsvrc12_synset_words.txt") || mClassSynset.size() != mOutputClasses || mClassDesc.size() != mOutputClasses )
{
printf("imageNet -- failed to load synset class descriptions (%zu / %zu of %u)\n", mClassSynset.size(), mClassDesc.size(), mOutputClasses);
return false;
Expand Down
14 changes: 7 additions & 7 deletions segNet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,21 +34,21 @@ segNet::~segNet()
segNet* segNet::Create( NetworkType networkType )
{
if( networkType == FCN_ALEXNET_PASCAL_VOC )
return Create("FCN-Alexnet-PASCAL-VOC/deploy.prototxt", "FCN-Alexnet-PASCAL-VOC/snapshot_iter_146400.caffemodel", "FCN-Alexnet-PASCAL-VOC/pascal-voc-classes.txt", NULL );
return Create("networks/FCN-Alexnet-PASCAL-VOC/deploy.prototxt", "networks/FCN-Alexnet-PASCAL-VOC/snapshot_iter_146400.caffemodel", "networks/FCN-Alexnet-PASCAL-VOC/pascal-voc-classes.txt", NULL );
else if( networkType == FCN_ALEXNET_SYNTHIA_CVPR16 )
return Create("FCN-Alexnet-SYNTHIA-CVPR16/deploy.prototxt", "FCN-Alexnet-SYNTHIA-CVPR16/snapshot_iter_1206700.caffemodel", "FCN-Alexnet-SYNTHIA-CVPR16/synthia-cvpr16-labels.txt", "FCN-Alexnet-SYNTHIA-CVPR16/synthia-cvpr16-train-colors.txt" );
return Create("networks/FCN-Alexnet-SYNTHIA-CVPR16/deploy.prototxt", "networks/FCN-Alexnet-SYNTHIA-CVPR16/snapshot_iter_1206700.caffemodel", "networks/FCN-Alexnet-SYNTHIA-CVPR16/synthia-cvpr16-labels.txt", "networks/FCN-Alexnet-SYNTHIA-CVPR16/synthia-cvpr16-train-colors.txt" );
else if( networkType == FCN_ALEXNET_SYNTHIA_SUMMER_HD )
return Create("FCN-Alexnet-SYNTHIA-Summer-HD/deploy.prototxt", "FCN-Alexnet-SYNTHIA-Summer-HD/snapshot_iter_902888.caffemodel", "FCN-Alexnet-SYNTHIA-Summer-HD/synthia-seq-labels.txt", "FCN-Alexnet-SYNTHIA-Summer-HD/synthia-seq-train-colors.txt" );
return Create("networks/FCN-Alexnet-SYNTHIA-Summer-HD/deploy.prototxt", "networks/FCN-Alexnet-SYNTHIA-Summer-HD/snapshot_iter_902888.caffemodel", "networks/FCN-Alexnet-SYNTHIA-Summer-HD/synthia-seq-labels.txt", "networks/FCN-Alexnet-SYNTHIA-Summer-HD/synthia-seq-train-colors.txt" );
else if( networkType == FCN_ALEXNET_SYNTHIA_SUMMER_SD )
return Create("FCN-Alexnet-SYNTHIA-Summer-SD/deploy.prototxt", "FCN-Alexnet-SYNTHIA-Summer-SD/snapshot_iter_431816.caffemodel", "FCN-Alexnet-SYNTHIA-Summer-SD/synthia-seq-labels.txt", "FCN-Alexnet-SYNTHIA-Summer-SD/synthia-seq-train-colors.txt" );
return Create("networks/FCN-Alexnet-SYNTHIA-Summer-SD/deploy.prototxt", "networks/FCN-Alexnet-SYNTHIA-Summer-SD/snapshot_iter_431816.caffemodel", "networks/FCN-Alexnet-SYNTHIA-Summer-SD/synthia-seq-labels.txt", "networks/FCN-Alexnet-SYNTHIA-Summer-SD/synthia-seq-train-colors.txt" );
else if( networkType == FCN_ALEXNET_CITYSCAPES_HD )
return Create("FCN-Alexnet-Cityscapes-HD/deploy.prototxt", "FCN-Alexnet-Cityscapes-HD/snapshot_iter_367568.caffemodel", "FCN-Alexnet-Cityscapes-HD/cityscapes-labels.txt", "FCN-Alexnet-Cityscapes-HD/cityscapes-deploy-colors.txt" );
return Create("networks/FCN-Alexnet-Cityscapes-HD/deploy.prototxt", "networks/FCN-Alexnet-Cityscapes-HD/snapshot_iter_367568.caffemodel", "networks/FCN-Alexnet-Cityscapes-HD/cityscapes-labels.txt", "networks/FCN-Alexnet-Cityscapes-HD/cityscapes-deploy-colors.txt" );
else if( networkType == FCN_ALEXNET_CITYSCAPES_SD )
return Create("FCN-Alexnet-Cityscapes-SD/deploy.prototxt", "FCN-Alexnet-Cityscapes-SD/snapshot_iter_114860.caffemodel", "FCN-Alexnet-Cityscapes-SD/cityscapes-labels.txt", "FCN-Alexnet-Cityscapes-SD/cityscapes-deploy-colors.txt" );
return Create("networks/FCN-Alexnet-Cityscapes-SD/deploy.prototxt", "networks/FCN-Alexnet-Cityscapes-SD/snapshot_iter_114860.caffemodel", "networks/FCN-Alexnet-Cityscapes-SD/cityscapes-labels.txt", "networks/FCN-Alexnet-Cityscapes-SD/cityscapes-deploy-colors.txt" );
//else if( networkType == FCN_ALEXNET_AERIAL_FPV_720p_4ch )
// return Create("FCN-Alexnet-Aerial-FPV-4ch-720p/deploy.prototxt", "FCN-Alexnet-Aerial-FPV-4ch-720p/snapshot_iter_1777146.caffemodel", "FCN-Alexnet-Aerial-FPV-4ch-720p/fpv-labels.txt", "FCN-Alexnet-Aerial-FPV-4ch-720p/fpv-deploy-colors.txt", "data", "score_fr_4classes" );
else if( networkType == FCN_ALEXNET_AERIAL_FPV_720p )
return Create("FCN-Alexnet-Aerial-FPV-21ch-720p/deploy.prototxt", "FCN-Alexnet-Aerial-FPV-21ch-720p/snapshot_iter_248178.caffemodel", "FCN-Alexnet-Aerial-FPV-21ch-720p/fpv-labels.txt", "FCN-Alexnet-Aerial-FPV-21ch-720p/fpv-deploy-colors.txt" );
return Create("networks/FCN-Alexnet-Aerial-FPV-21ch-720p/deploy.prototxt", "networks/FCN-Alexnet-Aerial-FPV-21ch-720p/snapshot_iter_248178.caffemodel", "networks/FCN-Alexnet-Aerial-FPV-21ch-720p/fpv-labels.txt", "networks/FCN-Alexnet-Aerial-FPV-21ch-720p/fpv-deploy-colors.txt" );
else
return NULL;
}
Expand Down

0 comments on commit 6e3733b

Please sign in to comment.