diff --git a/android/example_app/gradle.properties b/android/example_app/gradle.properties index 145e6430..7f2bbd41 100644 --- a/android/example_app/gradle.properties +++ b/android/example_app/gradle.properties @@ -1,2 +1,6 @@ NNFW_EXT_LIBRARY_PATH=src/main/jni/nnfw/ext SNPE_EXT_LIBRARY_PATH=src/main/jni/snpe/lib/ext + +org.gradle.parallel=true +org.gradle.daemon=true +org.gradle.jvmargs=-Xmx4000m diff --git a/android/example_app/style-transfer-with-nnstreamer-java-api/README.md b/android/example_app/style-transfer-with-nnstreamer-java-api/README.md index 09287988..f97176db 100644 --- a/android/example_app/style-transfer-with-nnstreamer-java-api/README.md +++ b/android/example_app/style-transfer-with-nnstreamer-java-api/README.md @@ -3,16 +3,29 @@ ## Prequisite - To run this sample, copy nnstreamer-api library file (nnstreamer-YYYY-MM-DD.aar) into 'libs' directory. +- For image classification, user should turn on MXNet option. + - [How to build NNStreamer for Android](https://github.com/nnstreamer/nnstreamer/tree/master/api/android) ## Introduction -This is a simple example to show how to use NNStreamer APIs and Android Camera API to utilize the style transfer model. +1. This is a simple example to show how to use NNStreamer APIs and Android Camera API to utilize the style transfer model. (tflite model) - The topmost view is the preview image of the camera. - The bottom view shows style transferred image of the camera input. - The applied style changes after several seconds. +2. This is a simple example to show how to use NNStreamer APIs and Android Camera API to utilize the image classification model. (MXNet model) + +- The topmost view is the preview image of the camera. +- The bottom view shows the camera input and its classification result on the screen together. +- The applied classification results change directly as the camera screen changes. + ## Screenshot +1. ![styletransfer_nnstreamer_screenshot](./styletransfer_nnstreamer_screenshot.webp) + +2. + + diff --git a/android/example_app/style-transfer-with-nnstreamer-java-api/src/main/AndroidManifest.xml b/android/example_app/style-transfer-with-nnstreamer-java-api/src/main/AndroidManifest.xml index 2eb45d99..274d7c82 100644 --- a/android/example_app/style-transfer-with-nnstreamer-java-api/src/main/AndroidManifest.xml +++ b/android/example_app/style-transfer-with-nnstreamer-java-api/src/main/AndroidManifest.xml @@ -10,17 +10,24 @@ + + + diff --git a/android/example_app/style-transfer-with-nnstreamer-java-api/src/main/assets/models/Inception-BN.json b/android/example_app/style-transfer-with-nnstreamer-java-api/src/main/assets/models/Inception-BN.json new file mode 100644 index 00000000..c2bb0737 --- /dev/null +++ b/android/example_app/style-transfer-with-nnstreamer-java-api/src/main/assets/models/Inception-BN.json @@ -0,0 +1,5113 @@ +{ + "nodes": [ + { + "op": "null", + "param": {}, + "name": "data", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_1_weight", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_1_bias", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "Convolution", + "param": { + "cudnn_off": "False", + "cudnn_tune": "off", + "dilate": "(1,1)", + "kernel": "(7,7)", + "no_bias": "False", + "num_filter": "64", + "num_group": "1", + "pad": "(3,3)", + "stride": "(2,2)", + "workspace": "1024" + }, + "name": "conv_1", + "inputs": [[0, 0], [1, 0], [2, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_1_gamma", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_1_beta", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "BatchNorm", + "param": { + "eps": "1.00001e-05", + "fix_gamma": "False", + "momentum": "0.9", + "use_global_stats": "False" + }, + "name": "bn_1", + "inputs": [[3, 0], [4, 0], [5, 0]], + "backward_source_id": -1 + }, + { + "op": "Activation", + "param": {"act_type": "relu"}, + "name": "relu_1", + "inputs": [[6, 0]], + "backward_source_id": -1 + }, + { + "op": "Pooling", + "param": { + "global_pool": "False", + "kernel": "(3,3)", + "pad": "(0,0)", + "pool_type": "max", + "pooling_convention": "valid", + "stride": "(2,2)" + }, + "name": "pool_1", + "inputs": [[7, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_2_red_weight", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_2_red_bias", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "Convolution", + "param": { + "cudnn_off": "False", + "cudnn_tune": "off", + "dilate": "(1,1)", + "kernel": "(1,1)", + "no_bias": "False", + "num_filter": "64", + "num_group": "1", + "pad": "(0,0)", + "stride": "(1,1)", + "workspace": "1024" + }, + "name": "conv_2_red", + "inputs": [[8, 0], [9, 0], [10, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_2_red_gamma", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_2_red_beta", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "BatchNorm", + "param": { + "eps": "1.00001e-05", + "fix_gamma": "False", + "momentum": "0.9", + "use_global_stats": "False" + }, + "name": "bn_2_red", + "inputs": [[11, 0], [12, 0], [13, 0]], + "backward_source_id": -1 + }, + { + "op": "Activation", + "param": {"act_type": "relu"}, + "name": "relu_2_red", + "inputs": [[14, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_2_weight", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_2_bias", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "Convolution", + "param": { + "cudnn_off": "False", + "cudnn_tune": "off", + "dilate": "(1,1)", + "kernel": "(3,3)", + "no_bias": "False", + "num_filter": "192", + "num_group": "1", + "pad": "(1,1)", + "stride": "(1,1)", + "workspace": "1024" + }, + "name": "conv_2", + "inputs": [[15, 0], [16, 0], [17, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_2_gamma", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_2_beta", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "BatchNorm", + "param": { + "eps": "1.00001e-05", + "fix_gamma": "False", + "momentum": "0.9", + "use_global_stats": "False" + }, + "name": "bn_2", + "inputs": [[18, 0], [19, 0], [20, 0]], + "backward_source_id": -1 + }, + { + "op": "Activation", + "param": {"act_type": "relu"}, + "name": "relu_2", + "inputs": [[21, 0]], + "backward_source_id": -1 + }, + { + "op": "Pooling", + "param": { + "global_pool": "False", + "kernel": "(3,3)", + "pad": "(0,0)", + "pool_type": "max", + "pooling_convention": "valid", + "stride": "(2,2)" + }, + "name": "pool_2", + "inputs": [[22, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_3a_1x1_weight", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_3a_1x1_bias", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "Convolution", + "param": { + "cudnn_off": "False", + "cudnn_tune": "off", + "dilate": "(1,1)", + "kernel": "(1,1)", + "no_bias": "False", + "num_filter": "64", + "num_group": "1", + "pad": "(0,0)", + "stride": "(1,1)", + "workspace": "1024" + }, + "name": "conv_3a_1x1", + "inputs": [[23, 0], [24, 0], [25, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_3a_1x1_gamma", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_3a_1x1_beta", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "BatchNorm", + "param": { + "eps": "1.00001e-05", + "fix_gamma": "False", + "momentum": "0.9", + "use_global_stats": "False" + }, + "name": "bn_3a_1x1", + "inputs": [[26, 0], [27, 0], [28, 0]], + "backward_source_id": -1 + }, + { + "op": "Activation", + "param": {"act_type": "relu"}, + "name": "relu_3a_1x1", + "inputs": [[29, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_3a_3x3_reduce_weight", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_3a_3x3_reduce_bias", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "Convolution", + "param": { + "cudnn_off": "False", + "cudnn_tune": "off", + "dilate": "(1,1)", + "kernel": "(1,1)", + "no_bias": "False", + "num_filter": "64", + "num_group": "1", + "pad": "(0,0)", + "stride": "(1,1)", + "workspace": "1024" + }, + "name": "conv_3a_3x3_reduce", + "inputs": [[23, 0], [31, 0], [32, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_3a_3x3_reduce_gamma", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_3a_3x3_reduce_beta", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "BatchNorm", + "param": { + "eps": "1.00001e-05", + "fix_gamma": "False", + "momentum": "0.9", + "use_global_stats": "False" + }, + "name": "bn_3a_3x3_reduce", + "inputs": [[33, 0], [34, 0], [35, 0]], + "backward_source_id": -1 + }, + { + "op": "Activation", + "param": {"act_type": "relu"}, + "name": "relu_3a_3x3_reduce", + "inputs": [[36, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_3a_3x3_weight", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_3a_3x3_bias", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "Convolution", + "param": { + "cudnn_off": "False", + "cudnn_tune": "off", + "dilate": "(1,1)", + "kernel": "(3,3)", + "no_bias": "False", + "num_filter": "64", + "num_group": "1", + "pad": "(1,1)", + "stride": "(1,1)", + "workspace": "1024" + }, + "name": "conv_3a_3x3", + "inputs": [[37, 0], [38, 0], [39, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_3a_3x3_gamma", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_3a_3x3_beta", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "BatchNorm", + "param": { + "eps": "1.00001e-05", + "fix_gamma": "False", + "momentum": "0.9", + "use_global_stats": "False" + }, + "name": "bn_3a_3x3", + "inputs": [[40, 0], [41, 0], [42, 0]], + "backward_source_id": -1 + }, + { + "op": "Activation", + "param": {"act_type": "relu"}, + "name": "relu_3a_3x3", + "inputs": [[43, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_3a_double_3x3_reduce_weight", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_3a_double_3x3_reduce_bias", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "Convolution", + "param": { + "cudnn_off": "False", + "cudnn_tune": "off", + "dilate": "(1,1)", + "kernel": "(1,1)", + "no_bias": "False", + "num_filter": "64", + "num_group": "1", + "pad": "(0,0)", + "stride": "(1,1)", + "workspace": "1024" + }, + "name": "conv_3a_double_3x3_reduce", + "inputs": [[23, 0], [45, 0], [46, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_3a_double_3x3_reduce_gamma", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_3a_double_3x3_reduce_beta", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "BatchNorm", + "param": { + "eps": "1.00001e-05", + "fix_gamma": "False", + "momentum": "0.9", + "use_global_stats": "False" + }, + "name": "bn_3a_double_3x3_reduce", + "inputs": [[47, 0], [48, 0], [49, 0]], + "backward_source_id": -1 + }, + { + "op": "Activation", + "param": {"act_type": "relu"}, + "name": "relu_3a_double_3x3_reduce", + "inputs": [[50, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_3a_double_3x3_0_weight", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_3a_double_3x3_0_bias", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "Convolution", + "param": { + "cudnn_off": "False", + "cudnn_tune": "off", + "dilate": "(1,1)", + "kernel": "(3,3)", + "no_bias": "False", + "num_filter": "96", + "num_group": "1", + "pad": "(1,1)", + "stride": "(1,1)", + "workspace": "1024" + }, + "name": "conv_3a_double_3x3_0", + "inputs": [[51, 0], [52, 0], [53, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_3a_double_3x3_0_gamma", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_3a_double_3x3_0_beta", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "BatchNorm", + "param": { + "eps": "1.00001e-05", + "fix_gamma": "False", + "momentum": "0.9", + "use_global_stats": "False" + }, + "name": "bn_3a_double_3x3_0", + "inputs": [[54, 0], [55, 0], [56, 0]], + "backward_source_id": -1 + }, + { + "op": "Activation", + "param": {"act_type": "relu"}, + "name": "relu_3a_double_3x3_0", + "inputs": [[57, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_3a_double_3x3_1_weight", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_3a_double_3x3_1_bias", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "Convolution", + "param": { + "cudnn_off": "False", + "cudnn_tune": "off", + "dilate": "(1,1)", + "kernel": "(3,3)", + "no_bias": "False", + "num_filter": "96", + "num_group": "1", + "pad": "(1,1)", + "stride": "(1,1)", + "workspace": "1024" + }, + "name": "conv_3a_double_3x3_1", + "inputs": [[58, 0], [59, 0], [60, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_3a_double_3x3_1_gamma", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_3a_double_3x3_1_beta", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "BatchNorm", + "param": { + "eps": "1.00001e-05", + "fix_gamma": "False", + "momentum": "0.9", + "use_global_stats": "False" + }, + "name": "bn_3a_double_3x3_1", + "inputs": [[61, 0], [62, 0], [63, 0]], + "backward_source_id": -1 + }, + { + "op": "Activation", + "param": {"act_type": "relu"}, + "name": "relu_3a_double_3x3_1", + "inputs": [[64, 0]], + "backward_source_id": -1 + }, + { + "op": "Pooling", + "param": { + "global_pool": "False", + "kernel": "(3,3)", + "pad": "(1,1)", + "pool_type": "avg", + "pooling_convention": "valid", + "stride": "(1,1)" + }, + "name": "avg_pool_3a_pool", + "inputs": [[23, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_3a_proj_weight", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_3a_proj_bias", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "Convolution", + "param": { + "cudnn_off": "False", + "cudnn_tune": "off", + "dilate": "(1,1)", + "kernel": "(1,1)", + "no_bias": "False", + "num_filter": "32", + "num_group": "1", + "pad": "(0,0)", + "stride": "(1,1)", + "workspace": "1024" + }, + "name": "conv_3a_proj", + "inputs": [[66, 0], [67, 0], [68, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_3a_proj_gamma", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_3a_proj_beta", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "BatchNorm", + "param": { + "eps": "1.00001e-05", + "fix_gamma": "False", + "momentum": "0.9", + "use_global_stats": "False" + }, + "name": "bn_3a_proj", + "inputs": [[69, 0], [70, 0], [71, 0]], + "backward_source_id": -1 + }, + { + "op": "Activation", + "param": {"act_type": "relu"}, + "name": "relu_3a_proj", + "inputs": [[72, 0]], + "backward_source_id": -1 + }, + { + "op": "Concat", + "param": { + "dim": "1", + "num_args": "4" + }, + "name": "ch_concat_3a_chconcat", + "inputs": [[30, 0], [44, 0], [65, 0], [73, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_3b_1x1_weight", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_3b_1x1_bias", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "Convolution", + "param": { + "cudnn_off": "False", + "cudnn_tune": "off", + "dilate": "(1,1)", + "kernel": "(1,1)", + "no_bias": "False", + "num_filter": "64", + "num_group": "1", + "pad": "(0,0)", + "stride": "(1,1)", + "workspace": "1024" + }, + "name": "conv_3b_1x1", + "inputs": [[74, 0], [75, 0], [76, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_3b_1x1_gamma", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_3b_1x1_beta", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "BatchNorm", + "param": { + "eps": "1.00001e-05", + "fix_gamma": "False", + "momentum": "0.9", + "use_global_stats": "False" + }, + "name": "bn_3b_1x1", + "inputs": [[77, 0], [78, 0], [79, 0]], + "backward_source_id": -1 + }, + { + "op": "Activation", + "param": {"act_type": "relu"}, + "name": "relu_3b_1x1", + "inputs": [[80, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_3b_3x3_reduce_weight", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_3b_3x3_reduce_bias", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "Convolution", + "param": { + "cudnn_off": "False", + "cudnn_tune": "off", + "dilate": "(1,1)", + "kernel": "(1,1)", + "no_bias": "False", + "num_filter": "64", + "num_group": "1", + "pad": "(0,0)", + "stride": "(1,1)", + "workspace": "1024" + }, + "name": "conv_3b_3x3_reduce", + "inputs": [[74, 0], [82, 0], [83, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_3b_3x3_reduce_gamma", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_3b_3x3_reduce_beta", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "BatchNorm", + "param": { + "eps": "1.00001e-05", + "fix_gamma": "False", + "momentum": "0.9", + "use_global_stats": "False" + }, + "name": "bn_3b_3x3_reduce", + "inputs": [[84, 0], [85, 0], [86, 0]], + "backward_source_id": -1 + }, + { + "op": "Activation", + "param": {"act_type": "relu"}, + "name": "relu_3b_3x3_reduce", + "inputs": [[87, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_3b_3x3_weight", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_3b_3x3_bias", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "Convolution", + "param": { + "cudnn_off": "False", + "cudnn_tune": "off", + "dilate": "(1,1)", + "kernel": "(3,3)", + "no_bias": "False", + "num_filter": "96", + "num_group": "1", + "pad": "(1,1)", + "stride": "(1,1)", + "workspace": "1024" + }, + "name": "conv_3b_3x3", + "inputs": [[88, 0], [89, 0], [90, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_3b_3x3_gamma", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_3b_3x3_beta", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "BatchNorm", + "param": { + "eps": "1.00001e-05", + "fix_gamma": "False", + "momentum": "0.9", + "use_global_stats": "False" + }, + "name": "bn_3b_3x3", + "inputs": [[91, 0], [92, 0], [93, 0]], + "backward_source_id": -1 + }, + { + "op": "Activation", + "param": {"act_type": "relu"}, + "name": "relu_3b_3x3", + "inputs": [[94, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_3b_double_3x3_reduce_weight", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_3b_double_3x3_reduce_bias", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "Convolution", + "param": { + "cudnn_off": "False", + "cudnn_tune": "off", + "dilate": "(1,1)", + "kernel": "(1,1)", + "no_bias": "False", + "num_filter": "64", + "num_group": "1", + "pad": "(0,0)", + "stride": "(1,1)", + "workspace": "1024" + }, + "name": "conv_3b_double_3x3_reduce", + "inputs": [[74, 0], [96, 0], [97, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_3b_double_3x3_reduce_gamma", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_3b_double_3x3_reduce_beta", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "BatchNorm", + "param": { + "eps": "1.00001e-05", + "fix_gamma": "False", + "momentum": "0.9", + "use_global_stats": "False" + }, + "name": "bn_3b_double_3x3_reduce", + "inputs": [[98, 0], [99, 0], [100, 0]], + "backward_source_id": -1 + }, + { + "op": "Activation", + "param": {"act_type": "relu"}, + "name": "relu_3b_double_3x3_reduce", + "inputs": [[101, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_3b_double_3x3_0_weight", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_3b_double_3x3_0_bias", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "Convolution", + "param": { + "cudnn_off": "False", + "cudnn_tune": "off", + "dilate": "(1,1)", + "kernel": "(3,3)", + "no_bias": "False", + "num_filter": "96", + "num_group": "1", + "pad": "(1,1)", + "stride": "(1,1)", + "workspace": "1024" + }, + "name": "conv_3b_double_3x3_0", + "inputs": [[102, 0], [103, 0], [104, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_3b_double_3x3_0_gamma", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_3b_double_3x3_0_beta", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "BatchNorm", + "param": { + "eps": "1.00001e-05", + "fix_gamma": "False", + "momentum": "0.9", + "use_global_stats": "False" + }, + "name": "bn_3b_double_3x3_0", + "inputs": [[105, 0], [106, 0], [107, 0]], + "backward_source_id": -1 + }, + { + "op": "Activation", + "param": {"act_type": "relu"}, + "name": "relu_3b_double_3x3_0", + "inputs": [[108, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_3b_double_3x3_1_weight", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_3b_double_3x3_1_bias", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "Convolution", + "param": { + "cudnn_off": "False", + "cudnn_tune": "off", + "dilate": "(1,1)", + "kernel": "(3,3)", + "no_bias": "False", + "num_filter": "96", + "num_group": "1", + "pad": "(1,1)", + "stride": "(1,1)", + "workspace": "1024" + }, + "name": "conv_3b_double_3x3_1", + "inputs": [[109, 0], [110, 0], [111, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_3b_double_3x3_1_gamma", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_3b_double_3x3_1_beta", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "BatchNorm", + "param": { + "eps": "1.00001e-05", + "fix_gamma": "False", + "momentum": "0.9", + "use_global_stats": "False" + }, + "name": "bn_3b_double_3x3_1", + "inputs": [[112, 0], [113, 0], [114, 0]], + "backward_source_id": -1 + }, + { + "op": "Activation", + "param": {"act_type": "relu"}, + "name": "relu_3b_double_3x3_1", + "inputs": [[115, 0]], + "backward_source_id": -1 + }, + { + "op": "Pooling", + "param": { + "global_pool": "False", + "kernel": "(3,3)", + "pad": "(1,1)", + "pool_type": "avg", + "pooling_convention": "valid", + "stride": "(1,1)" + }, + "name": "avg_pool_3b_pool", + "inputs": [[74, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_3b_proj_weight", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_3b_proj_bias", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "Convolution", + "param": { + "cudnn_off": "False", + "cudnn_tune": "off", + "dilate": "(1,1)", + "kernel": "(1,1)", + "no_bias": "False", + "num_filter": "64", + "num_group": "1", + "pad": "(0,0)", + "stride": "(1,1)", + "workspace": "1024" + }, + "name": "conv_3b_proj", + "inputs": [[117, 0], [118, 0], [119, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_3b_proj_gamma", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_3b_proj_beta", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "BatchNorm", + "param": { + "eps": "1.00001e-05", + "fix_gamma": "False", + "momentum": "0.9", + "use_global_stats": "False" + }, + "name": "bn_3b_proj", + "inputs": [[120, 0], [121, 0], [122, 0]], + "backward_source_id": -1 + }, + { + "op": "Activation", + "param": {"act_type": "relu"}, + "name": "relu_3b_proj", + "inputs": [[123, 0]], + "backward_source_id": -1 + }, + { + "op": "Concat", + "param": { + "dim": "1", + "num_args": "4" + }, + "name": "ch_concat_3b_chconcat", + "inputs": [[81, 0], [95, 0], [116, 0], [124, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_3c_3x3_reduce_weight", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_3c_3x3_reduce_bias", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "Convolution", + "param": { + "cudnn_off": "False", + "cudnn_tune": "off", + "dilate": "(1,1)", + "kernel": "(1,1)", + "no_bias": "False", + "num_filter": "128", + "num_group": "1", + "pad": "(0,0)", + "stride": "(1,1)", + "workspace": "1024" + }, + "name": "conv_3c_3x3_reduce", + "inputs": [[125, 0], [126, 0], [127, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_3c_3x3_reduce_gamma", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_3c_3x3_reduce_beta", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "BatchNorm", + "param": { + "eps": "1.00001e-05", + "fix_gamma": "False", + "momentum": "0.9", + "use_global_stats": "False" + }, + "name": "bn_3c_3x3_reduce", + "inputs": [[128, 0], [129, 0], [130, 0]], + "backward_source_id": -1 + }, + { + "op": "Activation", + "param": {"act_type": "relu"}, + "name": "relu_3c_3x3_reduce", + "inputs": [[131, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_3c_3x3_weight", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_3c_3x3_bias", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "Convolution", + "param": { + "cudnn_off": "False", + "cudnn_tune": "off", + "dilate": "(1,1)", + "kernel": "(3,3)", + "no_bias": "False", + "num_filter": "160", + "num_group": "1", + "pad": "(1,1)", + "stride": "(2,2)", + "workspace": "1024" + }, + "name": "conv_3c_3x3", + "inputs": [[132, 0], [133, 0], [134, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_3c_3x3_gamma", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_3c_3x3_beta", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "BatchNorm", + "param": { + "eps": "1.00001e-05", + "fix_gamma": "False", + "momentum": "0.9", + "use_global_stats": "False" + }, + "name": "bn_3c_3x3", + "inputs": [[135, 0], [136, 0], [137, 0]], + "backward_source_id": -1 + }, + { + "op": "Activation", + "param": {"act_type": "relu"}, + "name": "relu_3c_3x3", + "inputs": [[138, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_3c_double_3x3_reduce_weight", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_3c_double_3x3_reduce_bias", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "Convolution", + "param": { + "cudnn_off": "False", + "cudnn_tune": "off", + "dilate": "(1,1)", + "kernel": "(1,1)", + "no_bias": "False", + "num_filter": "64", + "num_group": "1", + "pad": "(0,0)", + "stride": "(1,1)", + "workspace": "1024" + }, + "name": "conv_3c_double_3x3_reduce", + "inputs": [[125, 0], [140, 0], [141, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_3c_double_3x3_reduce_gamma", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_3c_double_3x3_reduce_beta", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "BatchNorm", + "param": { + "eps": "1.00001e-05", + "fix_gamma": "False", + "momentum": "0.9", + "use_global_stats": "False" + }, + "name": "bn_3c_double_3x3_reduce", + "inputs": [[142, 0], [143, 0], [144, 0]], + "backward_source_id": -1 + }, + { + "op": "Activation", + "param": {"act_type": "relu"}, + "name": "relu_3c_double_3x3_reduce", + "inputs": [[145, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_3c_double_3x3_0_weight", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_3c_double_3x3_0_bias", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "Convolution", + "param": { + "cudnn_off": "False", + "cudnn_tune": "off", + "dilate": "(1,1)", + "kernel": "(3,3)", + "no_bias": "False", + "num_filter": "96", + "num_group": "1", + "pad": "(1,1)", + "stride": "(1,1)", + "workspace": "1024" + }, + "name": "conv_3c_double_3x3_0", + "inputs": [[146, 0], [147, 0], [148, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_3c_double_3x3_0_gamma", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_3c_double_3x3_0_beta", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "BatchNorm", + "param": { + "eps": "1.00001e-05", + "fix_gamma": "False", + "momentum": "0.9", + "use_global_stats": "False" + }, + "name": "bn_3c_double_3x3_0", + "inputs": [[149, 0], [150, 0], [151, 0]], + "backward_source_id": -1 + }, + { + "op": "Activation", + "param": {"act_type": "relu"}, + "name": "relu_3c_double_3x3_0", + "inputs": [[152, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_3c_double_3x3_1_weight", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_3c_double_3x3_1_bias", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "Convolution", + "param": { + "cudnn_off": "False", + "cudnn_tune": "off", + "dilate": "(1,1)", + "kernel": "(3,3)", + "no_bias": "False", + "num_filter": "96", + "num_group": "1", + "pad": "(1,1)", + "stride": "(2,2)", + "workspace": "1024" + }, + "name": "conv_3c_double_3x3_1", + "inputs": [[153, 0], [154, 0], [155, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_3c_double_3x3_1_gamma", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_3c_double_3x3_1_beta", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "BatchNorm", + "param": { + "eps": "1.00001e-05", + "fix_gamma": "False", + "momentum": "0.9", + "use_global_stats": "False" + }, + "name": "bn_3c_double_3x3_1", + "inputs": [[156, 0], [157, 0], [158, 0]], + "backward_source_id": -1 + }, + { + "op": "Activation", + "param": {"act_type": "relu"}, + "name": "relu_3c_double_3x3_1", + "inputs": [[159, 0]], + "backward_source_id": -1 + }, + { + "op": "Pooling", + "param": { + "global_pool": "False", + "kernel": "(3,3)", + "pad": "(1,1)", + "pool_type": "max", + "pooling_convention": "valid", + "stride": "(2,2)" + }, + "name": "max_pool_3c_pool", + "inputs": [[125, 0]], + "backward_source_id": -1 + }, + { + "op": "Concat", + "param": { + "dim": "1", + "num_args": "3" + }, + "name": "ch_concat_3c_chconcat", + "inputs": [[139, 0], [160, 0], [161, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_4a_1x1_weight", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_4a_1x1_bias", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "Convolution", + "param": { + "cudnn_off": "False", + "cudnn_tune": "off", + "dilate": "(1,1)", + "kernel": "(1,1)", + "no_bias": "False", + "num_filter": "224", + "num_group": "1", + "pad": "(0,0)", + "stride": "(1,1)", + "workspace": "1024" + }, + "name": "conv_4a_1x1", + "inputs": [[162, 0], [163, 0], [164, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_4a_1x1_gamma", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_4a_1x1_beta", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "BatchNorm", + "param": { + "eps": "1.00001e-05", + "fix_gamma": "False", + "momentum": "0.9", + "use_global_stats": "False" + }, + "name": "bn_4a_1x1", + "inputs": [[165, 0], [166, 0], [167, 0]], + "backward_source_id": -1 + }, + { + "op": "Activation", + "param": {"act_type": "relu"}, + "name": "relu_4a_1x1", + "inputs": [[168, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_4a_3x3_reduce_weight", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_4a_3x3_reduce_bias", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "Convolution", + "param": { + "cudnn_off": "False", + "cudnn_tune": "off", + "dilate": "(1,1)", + "kernel": "(1,1)", + "no_bias": "False", + "num_filter": "64", + "num_group": "1", + "pad": "(0,0)", + "stride": "(1,1)", + "workspace": "1024" + }, + "name": "conv_4a_3x3_reduce", + "inputs": [[162, 0], [170, 0], [171, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_4a_3x3_reduce_gamma", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_4a_3x3_reduce_beta", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "BatchNorm", + "param": { + "eps": "1.00001e-05", + "fix_gamma": "False", + "momentum": "0.9", + "use_global_stats": "False" + }, + "name": "bn_4a_3x3_reduce", + "inputs": [[172, 0], [173, 0], [174, 0]], + "backward_source_id": -1 + }, + { + "op": "Activation", + "param": {"act_type": "relu"}, + "name": "relu_4a_3x3_reduce", + "inputs": [[175, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_4a_3x3_weight", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_4a_3x3_bias", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "Convolution", + "param": { + "cudnn_off": "False", + "cudnn_tune": "off", + "dilate": "(1,1)", + "kernel": "(3,3)", + "no_bias": "False", + "num_filter": "96", + "num_group": "1", + "pad": "(1,1)", + "stride": "(1,1)", + "workspace": "1024" + }, + "name": "conv_4a_3x3", + "inputs": [[176, 0], [177, 0], [178, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_4a_3x3_gamma", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_4a_3x3_beta", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "BatchNorm", + "param": { + "eps": "1.00001e-05", + "fix_gamma": "False", + "momentum": "0.9", + "use_global_stats": "False" + }, + "name": "bn_4a_3x3", + "inputs": [[179, 0], [180, 0], [181, 0]], + "backward_source_id": -1 + }, + { + "op": "Activation", + "param": {"act_type": "relu"}, + "name": "relu_4a_3x3", + "inputs": [[182, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_4a_double_3x3_reduce_weight", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_4a_double_3x3_reduce_bias", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "Convolution", + "param": { + "cudnn_off": "False", + "cudnn_tune": "off", + "dilate": "(1,1)", + "kernel": "(1,1)", + "no_bias": "False", + "num_filter": "96", + "num_group": "1", + "pad": "(0,0)", + "stride": "(1,1)", + "workspace": "1024" + }, + "name": "conv_4a_double_3x3_reduce", + "inputs": [[162, 0], [184, 0], [185, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_4a_double_3x3_reduce_gamma", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_4a_double_3x3_reduce_beta", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "BatchNorm", + "param": { + "eps": "1.00001e-05", + "fix_gamma": "False", + "momentum": "0.9", + "use_global_stats": "False" + }, + "name": "bn_4a_double_3x3_reduce", + "inputs": [[186, 0], [187, 0], [188, 0]], + "backward_source_id": -1 + }, + { + "op": "Activation", + "param": {"act_type": "relu"}, + "name": "relu_4a_double_3x3_reduce", + "inputs": [[189, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_4a_double_3x3_0_weight", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_4a_double_3x3_0_bias", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "Convolution", + "param": { + "cudnn_off": "False", + "cudnn_tune": "off", + "dilate": "(1,1)", + "kernel": "(3,3)", + "no_bias": "False", + "num_filter": "128", + "num_group": "1", + "pad": "(1,1)", + "stride": "(1,1)", + "workspace": "1024" + }, + "name": "conv_4a_double_3x3_0", + "inputs": [[190, 0], [191, 0], [192, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_4a_double_3x3_0_gamma", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_4a_double_3x3_0_beta", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "BatchNorm", + "param": { + "eps": "1.00001e-05", + "fix_gamma": "False", + "momentum": "0.9", + "use_global_stats": "False" + }, + "name": "bn_4a_double_3x3_0", + "inputs": [[193, 0], [194, 0], [195, 0]], + "backward_source_id": -1 + }, + { + "op": "Activation", + "param": {"act_type": "relu"}, + "name": "relu_4a_double_3x3_0", + "inputs": [[196, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_4a_double_3x3_1_weight", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_4a_double_3x3_1_bias", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "Convolution", + "param": { + "cudnn_off": "False", + "cudnn_tune": "off", + "dilate": "(1,1)", + "kernel": "(3,3)", + "no_bias": "False", + "num_filter": "128", + "num_group": "1", + "pad": "(1,1)", + "stride": "(1,1)", + "workspace": "1024" + }, + "name": "conv_4a_double_3x3_1", + "inputs": [[197, 0], [198, 0], [199, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_4a_double_3x3_1_gamma", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_4a_double_3x3_1_beta", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "BatchNorm", + "param": { + "eps": "1.00001e-05", + "fix_gamma": "False", + "momentum": "0.9", + "use_global_stats": "False" + }, + "name": "bn_4a_double_3x3_1", + "inputs": [[200, 0], [201, 0], [202, 0]], + "backward_source_id": -1 + }, + { + "op": "Activation", + "param": {"act_type": "relu"}, + "name": "relu_4a_double_3x3_1", + "inputs": [[203, 0]], + "backward_source_id": -1 + }, + { + "op": "Pooling", + "param": { + "global_pool": "False", + "kernel": "(3,3)", + "pad": "(1,1)", + "pool_type": "avg", + "pooling_convention": "valid", + "stride": "(1,1)" + }, + "name": "avg_pool_4a_pool", + "inputs": [[162, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_4a_proj_weight", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_4a_proj_bias", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "Convolution", + "param": { + "cudnn_off": "False", + "cudnn_tune": "off", + "dilate": "(1,1)", + "kernel": "(1,1)", + "no_bias": "False", + "num_filter": "128", + "num_group": "1", + "pad": "(0,0)", + "stride": "(1,1)", + "workspace": "1024" + }, + "name": "conv_4a_proj", + "inputs": [[205, 0], [206, 0], [207, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_4a_proj_gamma", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_4a_proj_beta", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "BatchNorm", + "param": { + "eps": "1.00001e-05", + "fix_gamma": "False", + "momentum": "0.9", + "use_global_stats": "False" + }, + "name": "bn_4a_proj", + "inputs": [[208, 0], [209, 0], [210, 0]], + "backward_source_id": -1 + }, + { + "op": "Activation", + "param": {"act_type": "relu"}, + "name": "relu_4a_proj", + "inputs": [[211, 0]], + "backward_source_id": -1 + }, + { + "op": "Concat", + "param": { + "dim": "1", + "num_args": "4" + }, + "name": "ch_concat_4a_chconcat", + "inputs": [[169, 0], [183, 0], [204, 0], [212, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_4b_1x1_weight", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_4b_1x1_bias", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "Convolution", + "param": { + "cudnn_off": "False", + "cudnn_tune": "off", + "dilate": "(1,1)", + "kernel": "(1,1)", + "no_bias": "False", + "num_filter": "192", + "num_group": "1", + "pad": "(0,0)", + "stride": "(1,1)", + "workspace": "1024" + }, + "name": "conv_4b_1x1", + "inputs": [[213, 0], [214, 0], [215, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_4b_1x1_gamma", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_4b_1x1_beta", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "BatchNorm", + "param": { + "eps": "1.00001e-05", + "fix_gamma": "False", + "momentum": "0.9", + "use_global_stats": "False" + }, + "name": "bn_4b_1x1", + "inputs": [[216, 0], [217, 0], [218, 0]], + "backward_source_id": -1 + }, + { + "op": "Activation", + "param": {"act_type": "relu"}, + "name": "relu_4b_1x1", + "inputs": [[219, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_4b_3x3_reduce_weight", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_4b_3x3_reduce_bias", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "Convolution", + "param": { + "cudnn_off": "False", + "cudnn_tune": "off", + "dilate": "(1,1)", + "kernel": "(1,1)", + "no_bias": "False", + "num_filter": "96", + "num_group": "1", + "pad": "(0,0)", + "stride": "(1,1)", + "workspace": "1024" + }, + "name": "conv_4b_3x3_reduce", + "inputs": [[213, 0], [221, 0], [222, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_4b_3x3_reduce_gamma", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_4b_3x3_reduce_beta", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "BatchNorm", + "param": { + "eps": "1.00001e-05", + "fix_gamma": "False", + "momentum": "0.9", + "use_global_stats": "False" + }, + "name": "bn_4b_3x3_reduce", + "inputs": [[223, 0], [224, 0], [225, 0]], + "backward_source_id": -1 + }, + { + "op": "Activation", + "param": {"act_type": "relu"}, + "name": "relu_4b_3x3_reduce", + "inputs": [[226, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_4b_3x3_weight", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_4b_3x3_bias", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "Convolution", + "param": { + "cudnn_off": "False", + "cudnn_tune": "off", + "dilate": "(1,1)", + "kernel": "(3,3)", + "no_bias": "False", + "num_filter": "128", + "num_group": "1", + "pad": "(1,1)", + "stride": "(1,1)", + "workspace": "1024" + }, + "name": "conv_4b_3x3", + "inputs": [[227, 0], [228, 0], [229, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_4b_3x3_gamma", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_4b_3x3_beta", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "BatchNorm", + "param": { + "eps": "1.00001e-05", + "fix_gamma": "False", + "momentum": "0.9", + "use_global_stats": "False" + }, + "name": "bn_4b_3x3", + "inputs": [[230, 0], [231, 0], [232, 0]], + "backward_source_id": -1 + }, + { + "op": "Activation", + "param": {"act_type": "relu"}, + "name": "relu_4b_3x3", + "inputs": [[233, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_4b_double_3x3_reduce_weight", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_4b_double_3x3_reduce_bias", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "Convolution", + "param": { + "cudnn_off": "False", + "cudnn_tune": "off", + "dilate": "(1,1)", + "kernel": "(1,1)", + "no_bias": "False", + "num_filter": "96", + "num_group": "1", + "pad": "(0,0)", + "stride": "(1,1)", + "workspace": "1024" + }, + "name": "conv_4b_double_3x3_reduce", + "inputs": [[213, 0], [235, 0], [236, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_4b_double_3x3_reduce_gamma", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_4b_double_3x3_reduce_beta", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "BatchNorm", + "param": { + "eps": "1.00001e-05", + "fix_gamma": "False", + "momentum": "0.9", + "use_global_stats": "False" + }, + "name": "bn_4b_double_3x3_reduce", + "inputs": [[237, 0], [238, 0], [239, 0]], + "backward_source_id": -1 + }, + { + "op": "Activation", + "param": {"act_type": "relu"}, + "name": "relu_4b_double_3x3_reduce", + "inputs": [[240, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_4b_double_3x3_0_weight", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_4b_double_3x3_0_bias", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "Convolution", + "param": { + "cudnn_off": "False", + "cudnn_tune": "off", + "dilate": "(1,1)", + "kernel": "(3,3)", + "no_bias": "False", + "num_filter": "128", + "num_group": "1", + "pad": "(1,1)", + "stride": "(1,1)", + "workspace": "1024" + }, + "name": "conv_4b_double_3x3_0", + "inputs": [[241, 0], [242, 0], [243, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_4b_double_3x3_0_gamma", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_4b_double_3x3_0_beta", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "BatchNorm", + "param": { + "eps": "1.00001e-05", + "fix_gamma": "False", + "momentum": "0.9", + "use_global_stats": "False" + }, + "name": "bn_4b_double_3x3_0", + "inputs": [[244, 0], [245, 0], [246, 0]], + "backward_source_id": -1 + }, + { + "op": "Activation", + "param": {"act_type": "relu"}, + "name": "relu_4b_double_3x3_0", + "inputs": [[247, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_4b_double_3x3_1_weight", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_4b_double_3x3_1_bias", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "Convolution", + "param": { + "cudnn_off": "False", + "cudnn_tune": "off", + "dilate": "(1,1)", + "kernel": "(3,3)", + "no_bias": "False", + "num_filter": "128", + "num_group": "1", + "pad": "(1,1)", + "stride": "(1,1)", + "workspace": "1024" + }, + "name": "conv_4b_double_3x3_1", + "inputs": [[248, 0], [249, 0], [250, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_4b_double_3x3_1_gamma", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_4b_double_3x3_1_beta", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "BatchNorm", + "param": { + "eps": "1.00001e-05", + "fix_gamma": "False", + "momentum": "0.9", + "use_global_stats": "False" + }, + "name": "bn_4b_double_3x3_1", + "inputs": [[251, 0], [252, 0], [253, 0]], + "backward_source_id": -1 + }, + { + "op": "Activation", + "param": {"act_type": "relu"}, + "name": "relu_4b_double_3x3_1", + "inputs": [[254, 0]], + "backward_source_id": -1 + }, + { + "op": "Pooling", + "param": { + "global_pool": "False", + "kernel": "(3,3)", + "pad": "(1,1)", + "pool_type": "avg", + "pooling_convention": "valid", + "stride": "(1,1)" + }, + "name": "avg_pool_4b_pool", + "inputs": [[213, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_4b_proj_weight", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_4b_proj_bias", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "Convolution", + "param": { + "cudnn_off": "False", + "cudnn_tune": "off", + "dilate": "(1,1)", + "kernel": "(1,1)", + "no_bias": "False", + "num_filter": "128", + "num_group": "1", + "pad": "(0,0)", + "stride": "(1,1)", + "workspace": "1024" + }, + "name": "conv_4b_proj", + "inputs": [[256, 0], [257, 0], [258, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_4b_proj_gamma", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_4b_proj_beta", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "BatchNorm", + "param": { + "eps": "1.00001e-05", + "fix_gamma": "False", + "momentum": "0.9", + "use_global_stats": "False" + }, + "name": "bn_4b_proj", + "inputs": [[259, 0], [260, 0], [261, 0]], + "backward_source_id": -1 + }, + { + "op": "Activation", + "param": {"act_type": "relu"}, + "name": "relu_4b_proj", + "inputs": [[262, 0]], + "backward_source_id": -1 + }, + { + "op": "Concat", + "param": { + "dim": "1", + "num_args": "4" + }, + "name": "ch_concat_4b_chconcat", + "inputs": [[220, 0], [234, 0], [255, 0], [263, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_4c_1x1_weight", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_4c_1x1_bias", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "Convolution", + "param": { + "cudnn_off": "False", + "cudnn_tune": "off", + "dilate": "(1,1)", + "kernel": "(1,1)", + "no_bias": "False", + "num_filter": "160", + "num_group": "1", + "pad": "(0,0)", + "stride": "(1,1)", + "workspace": "1024" + }, + "name": "conv_4c_1x1", + "inputs": [[264, 0], [265, 0], [266, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_4c_1x1_gamma", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_4c_1x1_beta", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "BatchNorm", + "param": { + "eps": "1.00001e-05", + "fix_gamma": "False", + "momentum": "0.9", + "use_global_stats": "False" + }, + "name": "bn_4c_1x1", + "inputs": [[267, 0], [268, 0], [269, 0]], + "backward_source_id": -1 + }, + { + "op": "Activation", + "param": {"act_type": "relu"}, + "name": "relu_4c_1x1", + "inputs": [[270, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_4c_3x3_reduce_weight", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_4c_3x3_reduce_bias", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "Convolution", + "param": { + "cudnn_off": "False", + "cudnn_tune": "off", + "dilate": "(1,1)", + "kernel": "(1,1)", + "no_bias": "False", + "num_filter": "128", + "num_group": "1", + "pad": "(0,0)", + "stride": "(1,1)", + "workspace": "1024" + }, + "name": "conv_4c_3x3_reduce", + "inputs": [[264, 0], [272, 0], [273, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_4c_3x3_reduce_gamma", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_4c_3x3_reduce_beta", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "BatchNorm", + "param": { + "eps": "1.00001e-05", + "fix_gamma": "False", + "momentum": "0.9", + "use_global_stats": "False" + }, + "name": "bn_4c_3x3_reduce", + "inputs": [[274, 0], [275, 0], [276, 0]], + "backward_source_id": -1 + }, + { + "op": "Activation", + "param": {"act_type": "relu"}, + "name": "relu_4c_3x3_reduce", + "inputs": [[277, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_4c_3x3_weight", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_4c_3x3_bias", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "Convolution", + "param": { + "cudnn_off": "False", + "cudnn_tune": "off", + "dilate": "(1,1)", + "kernel": "(3,3)", + "no_bias": "False", + "num_filter": "160", + "num_group": "1", + "pad": "(1,1)", + "stride": "(1,1)", + "workspace": "1024" + }, + "name": "conv_4c_3x3", + "inputs": [[278, 0], [279, 0], [280, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_4c_3x3_gamma", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_4c_3x3_beta", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "BatchNorm", + "param": { + "eps": "1.00001e-05", + "fix_gamma": "False", + "momentum": "0.9", + "use_global_stats": "False" + }, + "name": "bn_4c_3x3", + "inputs": [[281, 0], [282, 0], [283, 0]], + "backward_source_id": -1 + }, + { + "op": "Activation", + "param": {"act_type": "relu"}, + "name": "relu_4c_3x3", + "inputs": [[284, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_4c_double_3x3_reduce_weight", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_4c_double_3x3_reduce_bias", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "Convolution", + "param": { + "cudnn_off": "False", + "cudnn_tune": "off", + "dilate": "(1,1)", + "kernel": "(1,1)", + "no_bias": "False", + "num_filter": "128", + "num_group": "1", + "pad": "(0,0)", + "stride": "(1,1)", + "workspace": "1024" + }, + "name": "conv_4c_double_3x3_reduce", + "inputs": [[264, 0], [286, 0], [287, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_4c_double_3x3_reduce_gamma", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_4c_double_3x3_reduce_beta", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "BatchNorm", + "param": { + "eps": "1.00001e-05", + "fix_gamma": "False", + "momentum": "0.9", + "use_global_stats": "False" + }, + "name": "bn_4c_double_3x3_reduce", + "inputs": [[288, 0], [289, 0], [290, 0]], + "backward_source_id": -1 + }, + { + "op": "Activation", + "param": {"act_type": "relu"}, + "name": "relu_4c_double_3x3_reduce", + "inputs": [[291, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_4c_double_3x3_0_weight", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_4c_double_3x3_0_bias", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "Convolution", + "param": { + "cudnn_off": "False", + "cudnn_tune": "off", + "dilate": "(1,1)", + "kernel": "(3,3)", + "no_bias": "False", + "num_filter": "160", + "num_group": "1", + "pad": "(1,1)", + "stride": "(1,1)", + "workspace": "1024" + }, + "name": "conv_4c_double_3x3_0", + "inputs": [[292, 0], [293, 0], [294, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_4c_double_3x3_0_gamma", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_4c_double_3x3_0_beta", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "BatchNorm", + "param": { + "eps": "1.00001e-05", + "fix_gamma": "False", + "momentum": "0.9", + "use_global_stats": "False" + }, + "name": "bn_4c_double_3x3_0", + "inputs": [[295, 0], [296, 0], [297, 0]], + "backward_source_id": -1 + }, + { + "op": "Activation", + "param": {"act_type": "relu"}, + "name": "relu_4c_double_3x3_0", + "inputs": [[298, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_4c_double_3x3_1_weight", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_4c_double_3x3_1_bias", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "Convolution", + "param": { + "cudnn_off": "False", + "cudnn_tune": "off", + "dilate": "(1,1)", + "kernel": "(3,3)", + "no_bias": "False", + "num_filter": "160", + "num_group": "1", + "pad": "(1,1)", + "stride": "(1,1)", + "workspace": "1024" + }, + "name": "conv_4c_double_3x3_1", + "inputs": [[299, 0], [300, 0], [301, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_4c_double_3x3_1_gamma", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_4c_double_3x3_1_beta", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "BatchNorm", + "param": { + "eps": "1.00001e-05", + "fix_gamma": "False", + "momentum": "0.9", + "use_global_stats": "False" + }, + "name": "bn_4c_double_3x3_1", + "inputs": [[302, 0], [303, 0], [304, 0]], + "backward_source_id": -1 + }, + { + "op": "Activation", + "param": {"act_type": "relu"}, + "name": "relu_4c_double_3x3_1", + "inputs": [[305, 0]], + "backward_source_id": -1 + }, + { + "op": "Pooling", + "param": { + "global_pool": "False", + "kernel": "(3,3)", + "pad": "(1,1)", + "pool_type": "avg", + "pooling_convention": "valid", + "stride": "(1,1)" + }, + "name": "avg_pool_4c_pool", + "inputs": [[264, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_4c_proj_weight", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_4c_proj_bias", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "Convolution", + "param": { + "cudnn_off": "False", + "cudnn_tune": "off", + "dilate": "(1,1)", + "kernel": "(1,1)", + "no_bias": "False", + "num_filter": "128", + "num_group": "1", + "pad": "(0,0)", + "stride": "(1,1)", + "workspace": "1024" + }, + "name": "conv_4c_proj", + "inputs": [[307, 0], [308, 0], [309, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_4c_proj_gamma", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_4c_proj_beta", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "BatchNorm", + "param": { + "eps": "1.00001e-05", + "fix_gamma": "False", + "momentum": "0.9", + "use_global_stats": "False" + }, + "name": "bn_4c_proj", + "inputs": [[310, 0], [311, 0], [312, 0]], + "backward_source_id": -1 + }, + { + "op": "Activation", + "param": {"act_type": "relu"}, + "name": "relu_4c_proj", + "inputs": [[313, 0]], + "backward_source_id": -1 + }, + { + "op": "Concat", + "param": { + "dim": "1", + "num_args": "4" + }, + "name": "ch_concat_4c_chconcat", + "inputs": [[271, 0], [285, 0], [306, 0], [314, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_4d_1x1_weight", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_4d_1x1_bias", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "Convolution", + "param": { + "cudnn_off": "False", + "cudnn_tune": "off", + "dilate": "(1,1)", + "kernel": "(1,1)", + "no_bias": "False", + "num_filter": "96", + "num_group": "1", + "pad": "(0,0)", + "stride": "(1,1)", + "workspace": "1024" + }, + "name": "conv_4d_1x1", + "inputs": [[315, 0], [316, 0], [317, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_4d_1x1_gamma", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_4d_1x1_beta", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "BatchNorm", + "param": { + "eps": "1.00001e-05", + "fix_gamma": "False", + "momentum": "0.9", + "use_global_stats": "False" + }, + "name": "bn_4d_1x1", + "inputs": [[318, 0], [319, 0], [320, 0]], + "backward_source_id": -1 + }, + { + "op": "Activation", + "param": {"act_type": "relu"}, + "name": "relu_4d_1x1", + "inputs": [[321, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_4d_3x3_reduce_weight", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_4d_3x3_reduce_bias", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "Convolution", + "param": { + "cudnn_off": "False", + "cudnn_tune": "off", + "dilate": "(1,1)", + "kernel": "(1,1)", + "no_bias": "False", + "num_filter": "128", + "num_group": "1", + "pad": "(0,0)", + "stride": "(1,1)", + "workspace": "1024" + }, + "name": "conv_4d_3x3_reduce", + "inputs": [[315, 0], [323, 0], [324, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_4d_3x3_reduce_gamma", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_4d_3x3_reduce_beta", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "BatchNorm", + "param": { + "eps": "1.00001e-05", + "fix_gamma": "False", + "momentum": "0.9", + "use_global_stats": "False" + }, + "name": "bn_4d_3x3_reduce", + "inputs": [[325, 0], [326, 0], [327, 0]], + "backward_source_id": -1 + }, + { + "op": "Activation", + "param": {"act_type": "relu"}, + "name": "relu_4d_3x3_reduce", + "inputs": [[328, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_4d_3x3_weight", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_4d_3x3_bias", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "Convolution", + "param": { + "cudnn_off": "False", + "cudnn_tune": "off", + "dilate": "(1,1)", + "kernel": "(3,3)", + "no_bias": "False", + "num_filter": "192", + "num_group": "1", + "pad": "(1,1)", + "stride": "(1,1)", + "workspace": "1024" + }, + "name": "conv_4d_3x3", + "inputs": [[329, 0], [330, 0], [331, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_4d_3x3_gamma", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_4d_3x3_beta", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "BatchNorm", + "param": { + "eps": "1.00001e-05", + "fix_gamma": "False", + "momentum": "0.9", + "use_global_stats": "False" + }, + "name": "bn_4d_3x3", + "inputs": [[332, 0], [333, 0], [334, 0]], + "backward_source_id": -1 + }, + { + "op": "Activation", + "param": {"act_type": "relu"}, + "name": "relu_4d_3x3", + "inputs": [[335, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_4d_double_3x3_reduce_weight", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_4d_double_3x3_reduce_bias", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "Convolution", + "param": { + "cudnn_off": "False", + "cudnn_tune": "off", + "dilate": "(1,1)", + "kernel": "(1,1)", + "no_bias": "False", + "num_filter": "160", + "num_group": "1", + "pad": "(0,0)", + "stride": "(1,1)", + "workspace": "1024" + }, + "name": "conv_4d_double_3x3_reduce", + "inputs": [[315, 0], [337, 0], [338, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_4d_double_3x3_reduce_gamma", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_4d_double_3x3_reduce_beta", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "BatchNorm", + "param": { + "eps": "1.00001e-05", + "fix_gamma": "False", + "momentum": "0.9", + "use_global_stats": "False" + }, + "name": "bn_4d_double_3x3_reduce", + "inputs": [[339, 0], [340, 0], [341, 0]], + "backward_source_id": -1 + }, + { + "op": "Activation", + "param": {"act_type": "relu"}, + "name": "relu_4d_double_3x3_reduce", + "inputs": [[342, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_4d_double_3x3_0_weight", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_4d_double_3x3_0_bias", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "Convolution", + "param": { + "cudnn_off": "False", + "cudnn_tune": "off", + "dilate": "(1,1)", + "kernel": "(3,3)", + "no_bias": "False", + "num_filter": "192", + "num_group": "1", + "pad": "(1,1)", + "stride": "(1,1)", + "workspace": "1024" + }, + "name": "conv_4d_double_3x3_0", + "inputs": [[343, 0], [344, 0], [345, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_4d_double_3x3_0_gamma", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_4d_double_3x3_0_beta", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "BatchNorm", + "param": { + "eps": "1.00001e-05", + "fix_gamma": "False", + "momentum": "0.9", + "use_global_stats": "False" + }, + "name": "bn_4d_double_3x3_0", + "inputs": [[346, 0], [347, 0], [348, 0]], + "backward_source_id": -1 + }, + { + "op": "Activation", + "param": {"act_type": "relu"}, + "name": "relu_4d_double_3x3_0", + "inputs": [[349, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_4d_double_3x3_1_weight", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_4d_double_3x3_1_bias", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "Convolution", + "param": { + "cudnn_off": "False", + "cudnn_tune": "off", + "dilate": "(1,1)", + "kernel": "(3,3)", + "no_bias": "False", + "num_filter": "192", + "num_group": "1", + "pad": "(1,1)", + "stride": "(1,1)", + "workspace": "1024" + }, + "name": "conv_4d_double_3x3_1", + "inputs": [[350, 0], [351, 0], [352, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_4d_double_3x3_1_gamma", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_4d_double_3x3_1_beta", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "BatchNorm", + "param": { + "eps": "1.00001e-05", + "fix_gamma": "False", + "momentum": "0.9", + "use_global_stats": "False" + }, + "name": "bn_4d_double_3x3_1", + "inputs": [[353, 0], [354, 0], [355, 0]], + "backward_source_id": -1 + }, + { + "op": "Activation", + "param": {"act_type": "relu"}, + "name": "relu_4d_double_3x3_1", + "inputs": [[356, 0]], + "backward_source_id": -1 + }, + { + "op": "Pooling", + "param": { + "global_pool": "False", + "kernel": "(3,3)", + "pad": "(1,1)", + "pool_type": "avg", + "pooling_convention": "valid", + "stride": "(1,1)" + }, + "name": "avg_pool_4d_pool", + "inputs": [[315, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_4d_proj_weight", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_4d_proj_bias", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "Convolution", + "param": { + "cudnn_off": "False", + "cudnn_tune": "off", + "dilate": "(1,1)", + "kernel": "(1,1)", + "no_bias": "False", + "num_filter": "128", + "num_group": "1", + "pad": "(0,0)", + "stride": "(1,1)", + "workspace": "1024" + }, + "name": "conv_4d_proj", + "inputs": [[358, 0], [359, 0], [360, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_4d_proj_gamma", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_4d_proj_beta", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "BatchNorm", + "param": { + "eps": "1.00001e-05", + "fix_gamma": "False", + "momentum": "0.9", + "use_global_stats": "False" + }, + "name": "bn_4d_proj", + "inputs": [[361, 0], [362, 0], [363, 0]], + "backward_source_id": -1 + }, + { + "op": "Activation", + "param": {"act_type": "relu"}, + "name": "relu_4d_proj", + "inputs": [[364, 0]], + "backward_source_id": -1 + }, + { + "op": "Concat", + "param": { + "dim": "1", + "num_args": "4" + }, + "name": "ch_concat_4d_chconcat", + "inputs": [[322, 0], [336, 0], [357, 0], [365, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_4e_3x3_reduce_weight", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_4e_3x3_reduce_bias", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "Convolution", + "param": { + "cudnn_off": "False", + "cudnn_tune": "off", + "dilate": "(1,1)", + "kernel": "(1,1)", + "no_bias": "False", + "num_filter": "128", + "num_group": "1", + "pad": "(0,0)", + "stride": "(1,1)", + "workspace": "1024" + }, + "name": "conv_4e_3x3_reduce", + "inputs": [[366, 0], [367, 0], [368, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_4e_3x3_reduce_gamma", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_4e_3x3_reduce_beta", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "BatchNorm", + "param": { + "eps": "1.00001e-05", + "fix_gamma": "False", + "momentum": "0.9", + "use_global_stats": "False" + }, + "name": "bn_4e_3x3_reduce", + "inputs": [[369, 0], [370, 0], [371, 0]], + "backward_source_id": -1 + }, + { + "op": "Activation", + "param": {"act_type": "relu"}, + "name": "relu_4e_3x3_reduce", + "inputs": [[372, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_4e_3x3_weight", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_4e_3x3_bias", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "Convolution", + "param": { + "cudnn_off": "False", + "cudnn_tune": "off", + "dilate": "(1,1)", + "kernel": "(3,3)", + "no_bias": "False", + "num_filter": "192", + "num_group": "1", + "pad": "(1,1)", + "stride": "(2,2)", + "workspace": "1024" + }, + "name": "conv_4e_3x3", + "inputs": [[373, 0], [374, 0], [375, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_4e_3x3_gamma", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_4e_3x3_beta", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "BatchNorm", + "param": { + "eps": "1.00001e-05", + "fix_gamma": "False", + "momentum": "0.9", + "use_global_stats": "False" + }, + "name": "bn_4e_3x3", + "inputs": [[376, 0], [377, 0], [378, 0]], + "backward_source_id": -1 + }, + { + "op": "Activation", + "param": {"act_type": "relu"}, + "name": "relu_4e_3x3", + "inputs": [[379, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_4e_double_3x3_reduce_weight", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_4e_double_3x3_reduce_bias", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "Convolution", + "param": { + "cudnn_off": "False", + "cudnn_tune": "off", + "dilate": "(1,1)", + "kernel": "(1,1)", + "no_bias": "False", + "num_filter": "192", + "num_group": "1", + "pad": "(0,0)", + "stride": "(1,1)", + "workspace": "1024" + }, + "name": "conv_4e_double_3x3_reduce", + "inputs": [[366, 0], [381, 0], [382, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_4e_double_3x3_reduce_gamma", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_4e_double_3x3_reduce_beta", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "BatchNorm", + "param": { + "eps": "1.00001e-05", + "fix_gamma": "False", + "momentum": "0.9", + "use_global_stats": "False" + }, + "name": "bn_4e_double_3x3_reduce", + "inputs": [[383, 0], [384, 0], [385, 0]], + "backward_source_id": -1 + }, + { + "op": "Activation", + "param": {"act_type": "relu"}, + "name": "relu_4e_double_3x3_reduce", + "inputs": [[386, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_4e_double_3x3_0_weight", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_4e_double_3x3_0_bias", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "Convolution", + "param": { + "cudnn_off": "False", + "cudnn_tune": "off", + "dilate": "(1,1)", + "kernel": "(3,3)", + "no_bias": "False", + "num_filter": "256", + "num_group": "1", + "pad": "(1,1)", + "stride": "(1,1)", + "workspace": "1024" + }, + "name": "conv_4e_double_3x3_0", + "inputs": [[387, 0], [388, 0], [389, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_4e_double_3x3_0_gamma", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_4e_double_3x3_0_beta", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "BatchNorm", + "param": { + "eps": "1.00001e-05", + "fix_gamma": "False", + "momentum": "0.9", + "use_global_stats": "False" + }, + "name": "bn_4e_double_3x3_0", + "inputs": [[390, 0], [391, 0], [392, 0]], + "backward_source_id": -1 + }, + { + "op": "Activation", + "param": {"act_type": "relu"}, + "name": "relu_4e_double_3x3_0", + "inputs": [[393, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_4e_double_3x3_1_weight", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_4e_double_3x3_1_bias", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "Convolution", + "param": { + "cudnn_off": "False", + "cudnn_tune": "off", + "dilate": "(1,1)", + "kernel": "(3,3)", + "no_bias": "False", + "num_filter": "256", + "num_group": "1", + "pad": "(1,1)", + "stride": "(2,2)", + "workspace": "1024" + }, + "name": "conv_4e_double_3x3_1", + "inputs": [[394, 0], [395, 0], [396, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_4e_double_3x3_1_gamma", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_4e_double_3x3_1_beta", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "BatchNorm", + "param": { + "eps": "1.00001e-05", + "fix_gamma": "False", + "momentum": "0.9", + "use_global_stats": "False" + }, + "name": "bn_4e_double_3x3_1", + "inputs": [[397, 0], [398, 0], [399, 0]], + "backward_source_id": -1 + }, + { + "op": "Activation", + "param": {"act_type": "relu"}, + "name": "relu_4e_double_3x3_1", + "inputs": [[400, 0]], + "backward_source_id": -1 + }, + { + "op": "Pooling", + "param": { + "global_pool": "False", + "kernel": "(3,3)", + "pad": "(1,1)", + "pool_type": "max", + "pooling_convention": "valid", + "stride": "(2,2)" + }, + "name": "max_pool_4e_pool", + "inputs": [[366, 0]], + "backward_source_id": -1 + }, + { + "op": "Concat", + "param": { + "dim": "1", + "num_args": "3" + }, + "name": "ch_concat_4e_chconcat", + "inputs": [[380, 0], [401, 0], [402, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_5a_1x1_weight", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_5a_1x1_bias", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "Convolution", + "param": { + "cudnn_off": "False", + "cudnn_tune": "off", + "dilate": "(1,1)", + "kernel": "(1,1)", + "no_bias": "False", + "num_filter": "352", + "num_group": "1", + "pad": "(0,0)", + "stride": "(1,1)", + "workspace": "1024" + }, + "name": "conv_5a_1x1", + "inputs": [[403, 0], [404, 0], [405, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_5a_1x1_gamma", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_5a_1x1_beta", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "BatchNorm", + "param": { + "eps": "1.00001e-05", + "fix_gamma": "False", + "momentum": "0.9", + "use_global_stats": "False" + }, + "name": "bn_5a_1x1", + "inputs": [[406, 0], [407, 0], [408, 0]], + "backward_source_id": -1 + }, + { + "op": "Activation", + "param": {"act_type": "relu"}, + "name": "relu_5a_1x1", + "inputs": [[409, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_5a_3x3_reduce_weight", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_5a_3x3_reduce_bias", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "Convolution", + "param": { + "cudnn_off": "False", + "cudnn_tune": "off", + "dilate": "(1,1)", + "kernel": "(1,1)", + "no_bias": "False", + "num_filter": "192", + "num_group": "1", + "pad": "(0,0)", + "stride": "(1,1)", + "workspace": "1024" + }, + "name": "conv_5a_3x3_reduce", + "inputs": [[403, 0], [411, 0], [412, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_5a_3x3_reduce_gamma", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_5a_3x3_reduce_beta", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "BatchNorm", + "param": { + "eps": "1.00001e-05", + "fix_gamma": "False", + "momentum": "0.9", + "use_global_stats": "False" + }, + "name": "bn_5a_3x3_reduce", + "inputs": [[413, 0], [414, 0], [415, 0]], + "backward_source_id": -1 + }, + { + "op": "Activation", + "param": {"act_type": "relu"}, + "name": "relu_5a_3x3_reduce", + "inputs": [[416, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_5a_3x3_weight", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_5a_3x3_bias", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "Convolution", + "param": { + "cudnn_off": "False", + "cudnn_tune": "off", + "dilate": "(1,1)", + "kernel": "(3,3)", + "no_bias": "False", + "num_filter": "320", + "num_group": "1", + "pad": "(1,1)", + "stride": "(1,1)", + "workspace": "1024" + }, + "name": "conv_5a_3x3", + "inputs": [[417, 0], [418, 0], [419, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_5a_3x3_gamma", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_5a_3x3_beta", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "BatchNorm", + "param": { + "eps": "1.00001e-05", + "fix_gamma": "False", + "momentum": "0.9", + "use_global_stats": "False" + }, + "name": "bn_5a_3x3", + "inputs": [[420, 0], [421, 0], [422, 0]], + "backward_source_id": -1 + }, + { + "op": "Activation", + "param": {"act_type": "relu"}, + "name": "relu_5a_3x3", + "inputs": [[423, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_5a_double_3x3_reduce_weight", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_5a_double_3x3_reduce_bias", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "Convolution", + "param": { + "cudnn_off": "False", + "cudnn_tune": "off", + "dilate": "(1,1)", + "kernel": "(1,1)", + "no_bias": "False", + "num_filter": "160", + "num_group": "1", + "pad": "(0,0)", + "stride": "(1,1)", + "workspace": "1024" + }, + "name": "conv_5a_double_3x3_reduce", + "inputs": [[403, 0], [425, 0], [426, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_5a_double_3x3_reduce_gamma", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_5a_double_3x3_reduce_beta", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "BatchNorm", + "param": { + "eps": "1.00001e-05", + "fix_gamma": "False", + "momentum": "0.9", + "use_global_stats": "False" + }, + "name": "bn_5a_double_3x3_reduce", + "inputs": [[427, 0], [428, 0], [429, 0]], + "backward_source_id": -1 + }, + { + "op": "Activation", + "param": {"act_type": "relu"}, + "name": "relu_5a_double_3x3_reduce", + "inputs": [[430, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_5a_double_3x3_0_weight", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_5a_double_3x3_0_bias", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "Convolution", + "param": { + "cudnn_off": "False", + "cudnn_tune": "off", + "dilate": "(1,1)", + "kernel": "(3,3)", + "no_bias": "False", + "num_filter": "224", + "num_group": "1", + "pad": "(1,1)", + "stride": "(1,1)", + "workspace": "1024" + }, + "name": "conv_5a_double_3x3_0", + "inputs": [[431, 0], [432, 0], [433, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_5a_double_3x3_0_gamma", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_5a_double_3x3_0_beta", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "BatchNorm", + "param": { + "eps": "1.00001e-05", + "fix_gamma": "False", + "momentum": "0.9", + "use_global_stats": "False" + }, + "name": "bn_5a_double_3x3_0", + "inputs": [[434, 0], [435, 0], [436, 0]], + "backward_source_id": -1 + }, + { + "op": "Activation", + "param": {"act_type": "relu"}, + "name": "relu_5a_double_3x3_0", + "inputs": [[437, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_5a_double_3x3_1_weight", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_5a_double_3x3_1_bias", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "Convolution", + "param": { + "cudnn_off": "False", + "cudnn_tune": "off", + "dilate": "(1,1)", + "kernel": "(3,3)", + "no_bias": "False", + "num_filter": "224", + "num_group": "1", + "pad": "(1,1)", + "stride": "(1,1)", + "workspace": "1024" + }, + "name": "conv_5a_double_3x3_1", + "inputs": [[438, 0], [439, 0], [440, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_5a_double_3x3_1_gamma", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_5a_double_3x3_1_beta", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "BatchNorm", + "param": { + "eps": "1.00001e-05", + "fix_gamma": "False", + "momentum": "0.9", + "use_global_stats": "False" + }, + "name": "bn_5a_double_3x3_1", + "inputs": [[441, 0], [442, 0], [443, 0]], + "backward_source_id": -1 + }, + { + "op": "Activation", + "param": {"act_type": "relu"}, + "name": "relu_5a_double_3x3_1", + "inputs": [[444, 0]], + "backward_source_id": -1 + }, + { + "op": "Pooling", + "param": { + "global_pool": "False", + "kernel": "(3,3)", + "pad": "(1,1)", + "pool_type": "avg", + "pooling_convention": "valid", + "stride": "(1,1)" + }, + "name": "avg_pool_5a_pool", + "inputs": [[403, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_5a_proj_weight", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_5a_proj_bias", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "Convolution", + "param": { + "cudnn_off": "False", + "cudnn_tune": "off", + "dilate": "(1,1)", + "kernel": "(1,1)", + "no_bias": "False", + "num_filter": "128", + "num_group": "1", + "pad": "(0,0)", + "stride": "(1,1)", + "workspace": "1024" + }, + "name": "conv_5a_proj", + "inputs": [[446, 0], [447, 0], [448, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_5a_proj_gamma", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_5a_proj_beta", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "BatchNorm", + "param": { + "eps": "1.00001e-05", + "fix_gamma": "False", + "momentum": "0.9", + "use_global_stats": "False" + }, + "name": "bn_5a_proj", + "inputs": [[449, 0], [450, 0], [451, 0]], + "backward_source_id": -1 + }, + { + "op": "Activation", + "param": {"act_type": "relu"}, + "name": "relu_5a_proj", + "inputs": [[452, 0]], + "backward_source_id": -1 + }, + { + "op": "Concat", + "param": { + "dim": "1", + "num_args": "4" + }, + "name": "ch_concat_5a_chconcat", + "inputs": [[410, 0], [424, 0], [445, 0], [453, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_5b_1x1_weight", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_5b_1x1_bias", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "Convolution", + "param": { + "cudnn_off": "False", + "cudnn_tune": "off", + "dilate": "(1,1)", + "kernel": "(1,1)", + "no_bias": "False", + "num_filter": "352", + "num_group": "1", + "pad": "(0,0)", + "stride": "(1,1)", + "workspace": "1024" + }, + "name": "conv_5b_1x1", + "inputs": [[454, 0], [455, 0], [456, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_5b_1x1_gamma", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_5b_1x1_beta", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "BatchNorm", + "param": { + "eps": "1.00001e-05", + "fix_gamma": "False", + "momentum": "0.9", + "use_global_stats": "False" + }, + "name": "bn_5b_1x1", + "inputs": [[457, 0], [458, 0], [459, 0]], + "backward_source_id": -1 + }, + { + "op": "Activation", + "param": {"act_type": "relu"}, + "name": "relu_5b_1x1", + "inputs": [[460, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_5b_3x3_reduce_weight", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_5b_3x3_reduce_bias", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "Convolution", + "param": { + "cudnn_off": "False", + "cudnn_tune": "off", + "dilate": "(1,1)", + "kernel": "(1,1)", + "no_bias": "False", + "num_filter": "192", + "num_group": "1", + "pad": "(0,0)", + "stride": "(1,1)", + "workspace": "1024" + }, + "name": "conv_5b_3x3_reduce", + "inputs": [[454, 0], [462, 0], [463, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_5b_3x3_reduce_gamma", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_5b_3x3_reduce_beta", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "BatchNorm", + "param": { + "eps": "1.00001e-05", + "fix_gamma": "False", + "momentum": "0.9", + "use_global_stats": "False" + }, + "name": "bn_5b_3x3_reduce", + "inputs": [[464, 0], [465, 0], [466, 0]], + "backward_source_id": -1 + }, + { + "op": "Activation", + "param": {"act_type": "relu"}, + "name": "relu_5b_3x3_reduce", + "inputs": [[467, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_5b_3x3_weight", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_5b_3x3_bias", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "Convolution", + "param": { + "cudnn_off": "False", + "cudnn_tune": "off", + "dilate": "(1,1)", + "kernel": "(3,3)", + "no_bias": "False", + "num_filter": "320", + "num_group": "1", + "pad": "(1,1)", + "stride": "(1,1)", + "workspace": "1024" + }, + "name": "conv_5b_3x3", + "inputs": [[468, 0], [469, 0], [470, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_5b_3x3_gamma", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_5b_3x3_beta", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "BatchNorm", + "param": { + "eps": "1.00001e-05", + "fix_gamma": "False", + "momentum": "0.9", + "use_global_stats": "False" + }, + "name": "bn_5b_3x3", + "inputs": [[471, 0], [472, 0], [473, 0]], + "backward_source_id": -1 + }, + { + "op": "Activation", + "param": {"act_type": "relu"}, + "name": "relu_5b_3x3", + "inputs": [[474, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_5b_double_3x3_reduce_weight", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_5b_double_3x3_reduce_bias", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "Convolution", + "param": { + "cudnn_off": "False", + "cudnn_tune": "off", + "dilate": "(1,1)", + "kernel": "(1,1)", + "no_bias": "False", + "num_filter": "192", + "num_group": "1", + "pad": "(0,0)", + "stride": "(1,1)", + "workspace": "1024" + }, + "name": "conv_5b_double_3x3_reduce", + "inputs": [[454, 0], [476, 0], [477, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_5b_double_3x3_reduce_gamma", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_5b_double_3x3_reduce_beta", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "BatchNorm", + "param": { + "eps": "1.00001e-05", + "fix_gamma": "False", + "momentum": "0.9", + "use_global_stats": "False" + }, + "name": "bn_5b_double_3x3_reduce", + "inputs": [[478, 0], [479, 0], [480, 0]], + "backward_source_id": -1 + }, + { + "op": "Activation", + "param": {"act_type": "relu"}, + "name": "relu_5b_double_3x3_reduce", + "inputs": [[481, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_5b_double_3x3_0_weight", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_5b_double_3x3_0_bias", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "Convolution", + "param": { + "cudnn_off": "False", + "cudnn_tune": "off", + "dilate": "(1,1)", + "kernel": "(3,3)", + "no_bias": "False", + "num_filter": "224", + "num_group": "1", + "pad": "(1,1)", + "stride": "(1,1)", + "workspace": "1024" + }, + "name": "conv_5b_double_3x3_0", + "inputs": [[482, 0], [483, 0], [484, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_5b_double_3x3_0_gamma", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_5b_double_3x3_0_beta", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "BatchNorm", + "param": { + "eps": "1.00001e-05", + "fix_gamma": "False", + "momentum": "0.9", + "use_global_stats": "False" + }, + "name": "bn_5b_double_3x3_0", + "inputs": [[485, 0], [486, 0], [487, 0]], + "backward_source_id": -1 + }, + { + "op": "Activation", + "param": {"act_type": "relu"}, + "name": "relu_5b_double_3x3_0", + "inputs": [[488, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_5b_double_3x3_1_weight", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_5b_double_3x3_1_bias", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "Convolution", + "param": { + "cudnn_off": "False", + "cudnn_tune": "off", + "dilate": "(1,1)", + "kernel": "(3,3)", + "no_bias": "False", + "num_filter": "224", + "num_group": "1", + "pad": "(1,1)", + "stride": "(1,1)", + "workspace": "1024" + }, + "name": "conv_5b_double_3x3_1", + "inputs": [[489, 0], [490, 0], [491, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_5b_double_3x3_1_gamma", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_5b_double_3x3_1_beta", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "BatchNorm", + "param": { + "eps": "1.00001e-05", + "fix_gamma": "False", + "momentum": "0.9", + "use_global_stats": "False" + }, + "name": "bn_5b_double_3x3_1", + "inputs": [[492, 0], [493, 0], [494, 0]], + "backward_source_id": -1 + }, + { + "op": "Activation", + "param": {"act_type": "relu"}, + "name": "relu_5b_double_3x3_1", + "inputs": [[495, 0]], + "backward_source_id": -1 + }, + { + "op": "Pooling", + "param": { + "global_pool": "False", + "kernel": "(3,3)", + "pad": "(1,1)", + "pool_type": "max", + "pooling_convention": "valid", + "stride": "(1,1)" + }, + "name": "max_pool_5b_pool", + "inputs": [[454, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_5b_proj_weight", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "conv_5b_proj_bias", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "Convolution", + "param": { + "cudnn_off": "False", + "cudnn_tune": "off", + "dilate": "(1,1)", + "kernel": "(1,1)", + "no_bias": "False", + "num_filter": "128", + "num_group": "1", + "pad": "(0,0)", + "stride": "(1,1)", + "workspace": "1024" + }, + "name": "conv_5b_proj", + "inputs": [[497, 0], [498, 0], [499, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_5b_proj_gamma", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "bn_5b_proj_beta", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "BatchNorm", + "param": { + "eps": "1.00001e-05", + "fix_gamma": "False", + "momentum": "0.9", + "use_global_stats": "False" + }, + "name": "bn_5b_proj", + "inputs": [[500, 0], [501, 0], [502, 0]], + "backward_source_id": -1 + }, + { + "op": "Activation", + "param": {"act_type": "relu"}, + "name": "relu_5b_proj", + "inputs": [[503, 0]], + "backward_source_id": -1 + }, + { + "op": "Concat", + "param": { + "dim": "1", + "num_args": "4" + }, + "name": "ch_concat_5b_chconcat", + "inputs": [[461, 0], [475, 0], [496, 0], [504, 0]], + "backward_source_id": -1 + }, + { + "op": "Pooling", + "param": { + "global_pool": "False", + "kernel": "(7,7)", + "pad": "(0,0)", + "pool_type": "avg", + "pooling_convention": "valid", + "stride": "(1,1)" + }, + "name": "global_pool", + "inputs": [[505, 0]], + "backward_source_id": -1 + }, + { + "op": "Flatten", + "param": {}, + "name": "flatten", + "inputs": [[506, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "fc1_weight", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "fc1_bias", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "FullyConnected", + "param": { + "no_bias": "False", + "num_hidden": "1000" + }, + "name": "fc1", + "inputs": [[507, 0], [508, 0], [509, 0]], + "backward_source_id": -1 + }, + { + "op": "null", + "param": {}, + "name": "softmax_label", + "inputs": [], + "backward_source_id": -1 + }, + { + "op": "SoftmaxOutput", + "param": { + "grad_scale": "1", + "ignore_label": "-1", + "multi_output": "False", + "normalization": "null", + "preserve_shape": "False", + "use_ignore": "False" + }, + "name": "softmax", + "inputs": [[510, 0], [511, 0]], + "backward_source_id": -1 + } + ], + "arg_nodes": [ + 0, + 1, + 2, + 4, + 5, + 9, + 10, + 12, + 13, + 16, + 17, + 19, + 20, + 24, + 25, + 27, + 28, + 31, + 32, + 34, + 35, + 38, + 39, + 41, + 42, + 45, + 46, + 48, + 49, + 52, + 53, + 55, + 56, + 59, + 60, + 62, + 63, + 67, + 68, + 70, + 71, + 75, + 76, + 78, + 79, + 82, + 83, + 85, + 86, + 89, + 90, + 92, + 93, + 96, + 97, + 99, + 100, + 103, + 104, + 106, + 107, + 110, + 111, + 113, + 114, + 118, + 119, + 121, + 122, + 126, + 127, + 129, + 130, + 133, + 134, + 136, + 137, + 140, + 141, + 143, + 144, + 147, + 148, + 150, + 151, + 154, + 155, + 157, + 158, + 163, + 164, + 166, + 167, + 170, + 171, + 173, + 174, + 177, + 178, + 180, + 181, + 184, + 185, + 187, + 188, + 191, + 192, + 194, + 195, + 198, + 199, + 201, + 202, + 206, + 207, + 209, + 210, + 214, + 215, + 217, + 218, + 221, + 222, + 224, + 225, + 228, + 229, + 231, + 232, + 235, + 236, + 238, + 239, + 242, + 243, + 245, + 246, + 249, + 250, + 252, + 253, + 257, + 258, + 260, + 261, + 265, + 266, + 268, + 269, + 272, + 273, + 275, + 276, + 279, + 280, + 282, + 283, + 286, + 287, + 289, + 290, + 293, + 294, + 296, + 297, + 300, + 301, + 303, + 304, + 308, + 309, + 311, + 312, + 316, + 317, + 319, + 320, + 323, + 324, + 326, + 327, + 330, + 331, + 333, + 334, + 337, + 338, + 340, + 341, + 344, + 345, + 347, + 348, + 351, + 352, + 354, + 355, + 359, + 360, + 362, + 363, + 367, + 368, + 370, + 371, + 374, + 375, + 377, + 378, + 381, + 382, + 384, + 385, + 388, + 389, + 391, + 392, + 395, + 396, + 398, + 399, + 404, + 405, + 407, + 408, + 411, + 412, + 414, + 415, + 418, + 419, + 421, + 422, + 425, + 426, + 428, + 429, + 432, + 433, + 435, + 436, + 439, + 440, + 442, + 443, + 447, + 448, + 450, + 451, + 455, + 456, + 458, + 459, + 462, + 463, + 465, + 466, + 469, + 470, + 472, + 473, + 476, + 477, + 479, + 480, + 483, + 484, + 486, + 487, + 490, + 491, + 493, + 494, + 498, + 499, + 501, + 502, + 508, + 509, + 511 + ], + "heads": [[512, 0]] +} \ No newline at end of file diff --git a/android/example_app/style-transfer-with-nnstreamer-java-api/src/main/assets/models/Inception-BN.params b/android/example_app/style-transfer-with-nnstreamer-java-api/src/main/assets/models/Inception-BN.params new file mode 100644 index 00000000..d3860e77 Binary files /dev/null and b/android/example_app/style-transfer-with-nnstreamer-java-api/src/main/assets/models/Inception-BN.params differ diff --git a/android/example_app/style-transfer-with-nnstreamer-java-api/src/main/assets/models/labels.txt b/android/example_app/style-transfer-with-nnstreamer-java-api/src/main/assets/models/labels.txt new file mode 100644 index 00000000..9b6fed55 --- /dev/null +++ b/android/example_app/style-transfer-with-nnstreamer-java-api/src/main/assets/models/labels.txt @@ -0,0 +1,1000 @@ +"tench, Tinca tinca" +"goldfish, Carassius auratus" +"great white shark, white shark, man-eater, man-eating shark, Carcharodon carcharias" +"tiger shark, Galeocerdo cuvieri" +"hammerhead, hammerhead shark" +"electric ray, crampfish, numbfish, torpedo" +"stingray" +"cock" +"hen" +"ostrich, Struthio camelus" +"brambling, Fringilla montifringilla" +"goldfinch, Carduelis carduelis" +"house finch, linnet, Carpodacus mexicanus" +"junco, snowbird" +"indigo bunting, indigo finch, indigo bird, Passerina cyanea" +"robin, American robin, Turdus migratorius" +"bulbul" +"jay" +"magpie" +"chickadee" +"water ouzel, dipper" +"kite" +"bald eagle, American eagle, Haliaeetus leucocephalus" +"vulture" +"great grey owl, great gray owl, Strix nebulosa" +"European fire salamander, Salamandra salamandra" +"common newt, Triturus vulgaris" +"eft" +"spotted salamander, Ambystoma maculatum" +"axolotl, mud puppy, Ambystoma mexicanum" +"bullfrog, Rana catesbeiana" +"tree frog, tree-frog" +"tailed frog, bell toad, ribbed toad, tailed toad, Ascaphus trui" +"loggerhead, loggerhead turtle, Caretta caretta" +"leatherback turtle, leatherback, leathery turtle, Dermochelys coriacea" +"mud turtle" +"terrapin" +"box turtle, box tortoise" +"banded gecko" +"common iguana, iguana, Iguana iguana" +"American chameleon, anole, Anolis carolinensis" +"whiptail, whiptail lizard" +"agama" +"frilled lizard, Chlamydosaurus kingi" +"alligator lizard" +"Gila monster, Heloderma suspectum" +"green lizard, Lacerta viridis" +"African chameleon, Chamaeleo chamaeleon" +"Komodo dragon, Komodo lizard, dragon lizard, giant lizard, Varanus komodoensis" +"African crocodile, Nile crocodile, Crocodylus niloticus" +"American alligator, Alligator mississipiensis" +"triceratops" +"thunder snake, worm snake, Carphophis amoenus" +"ringneck snake, ring-necked snake, ring snake" +"hognose snake, puff adder, sand viper" +"green snake, grass snake" +"king snake, kingsnake" +"garter snake, grass snake" +"water snake" +"vine snake" +"night snake, Hypsiglena torquata" +"boa constrictor, Constrictor constrictor" +"rock python, rock snake, Python sebae" +"Indian cobra, Naja naja" +"green mamba" +"sea snake" +"horned viper, cerastes, sand viper, horned asp, Cerastes cornutus" +"diamondback, diamondback rattlesnake, Crotalus adamanteus" +"sidewinder, horned rattlesnake, Crotalus cerastes" +"trilobite" +"harvestman, daddy longlegs, Phalangium opilio" +"scorpion" +"black and gold garden spider, Argiope aurantia" +"barn spider, Araneus cavaticus" +"garden spider, Aranea diademata" +"black widow, Latrodectus mactans" +"tarantula" +"wolf spider, hunting spider" +"tick" +"centipede" +"black grouse" +"ptarmigan" +"ruffed grouse, partridge, Bonasa umbellus" +"prairie chicken, prairie grouse, prairie fowl" +"peacock" +"quail" +"partridge" +"African grey, African gray, Psittacus erithacus" +"macaw" +"sulphur-crested cockatoo, Kakatoe galerita, Cacatua galerita" +"lorikeet" +"coucal" +"bee eater" +"hornbill" +"hummingbird" +"jacamar" +"toucan" +"drake" +"red-breasted merganser, Mergus serrator" +"goose" +"black swan, Cygnus atratus" +"tusker" +"echidna, spiny anteater, anteater" +"platypus, duckbill, duckbilled platypus, duck-billed platypus, Ornithorhynchus anatinus" +"wallaby, brush kangaroo" +"koala, koala bear, kangaroo bear, native bear, Phascolarctos cinereus" +"wombat" +"jellyfish" +"sea anemone, anemone" +"brain coral" +"flatworm, platyhelminth" +"nematode, nematode worm, roundworm" +"conch" +"snail" +"slug" +"sea slug, nudibranch" +"chiton, coat-of-mail shell, sea cradle, polyplacophore" +"chambered nautilus, pearly nautilus, nautilus" +"Dungeness crab, Cancer magister" +"rock crab, Cancer irroratus" +"fiddler crab" +"king crab, Alaska crab, Alaskan king crab, Alaska king crab, Paralithodes camtschatica" +"American lobster, Northern lobster, Maine lobster, Homarus americanus" +"spiny lobster, langouste, rock lobster, crawfish, crayfish, sea crawfish" +"crayfish, crawfish, crawdad, crawdaddy" +"hermit crab" +"isopod" +"white stork, Ciconia ciconia" +"black stork, Ciconia nigra" +"spoonbill" +"flamingo" +"little blue heron, Egretta caerulea" +"American egret, great white heron, Egretta albus" +"bittern" +"crane" +"limpkin, Aramus pictus" +"European gallinule, Porphyrio porphyrio" +"American coot, marsh hen, mud hen, water hen, Fulica americana" +"bustard" +"ruddy turnstone, Arenaria interpres" +"red-backed sandpiper, dunlin, Erolia alpina" +"redshank, Tringa totanus" +"dowitcher" +"oystercatcher, oyster catcher" +"pelican" +"king penguin, Aptenodytes patagonica" +"albatross, mollymawk" +"grey whale, gray whale, devilfish, Eschrichtius gibbosus, Eschrichtius robustus" +"killer whale, killer, orca, grampus, sea wolf, Orcinus orca" +"dugong, Dugong dugon" +"sea lion" +"Chihuahua" +"Japanese spaniel" +"Maltese dog, Maltese terrier, Maltese" +"Pekinese, Pekingese, Peke" +"Shih-Tzu" +"Blenheim spaniel" +"papillon" +"toy terrier" +"Rhodesian ridgeback" +"Afghan hound, Afghan" +"basset, basset hound" +"beagle" +"bloodhound, sleuthhound" +"bluetick" +"black-and-tan coonhound" +"Walker hound, Walker foxhound" +"English foxhound" +"redbone" +"borzoi, Russian wolfhound" +"Irish wolfhound" +"Italian greyhound" +"whippet" +"Ibizan hound, Ibizan Podenco" +"Norwegian elkhound, elkhound" +"otterhound, otter hound" +"Saluki, gazelle hound" +"Scottish deerhound, deerhound" +"Weimaraner" +"Staffordshire bullterrier, Staffordshire bull terrier" +"American Staffordshire terrier, Staffordshire terrier, American pit bull terrier, pit bull terrier" +"Bedlington terrier" +"Border terrier" +"Kerry blue terrier" +"Irish terrier" +"Norfolk terrier" +"Norwich terrier" +"Yorkshire terrier" +"wire-haired fox terrier" +"Lakeland terrier" +"Sealyham terrier, Sealyham" +"Airedale, Airedale terrier" +"cairn, cairn terrier" +"Australian terrier" +"Dandie Dinmont, Dandie Dinmont terrier" +"Boston bull, Boston terrier" +"miniature schnauzer" +"giant schnauzer" +"standard schnauzer" +"Scotch terrier, Scottish terrier, Scottie" +"Tibetan terrier, chrysanthemum dog" +"silky terrier, Sydney silky" +"soft-coated wheaten terrier" +"West Highland white terrier" +"Lhasa, Lhasa apso" +"flat-coated retriever" +"curly-coated retriever" +"golden retriever" +"Labrador retriever" +"Chesapeake Bay retriever" +"German short-haired pointer" +"vizsla, Hungarian pointer" +"English setter" +"Irish setter, red setter" +"Gordon setter" +"Brittany spaniel" +"clumber, clumber spaniel" +"English springer, English springer spaniel" +"Welsh springer spaniel" +"cocker spaniel, English cocker spaniel, cocker" +"Sussex spaniel" +"Irish water spaniel" +"kuvasz" +"schipperke" +"groenendael" +"malinois" +"briard" +"kelpie" +"komondor" +"Old English sheepdog, bobtail" +"Shetland sheepdog, Shetland sheep dog, Shetland" +"collie" +"Border collie" +"Bouvier des Flandres, Bouviers des Flandres" +"Rottweiler" +"German shepherd, German shepherd dog, German police dog, alsatian" +"Doberman, Doberman pinscher" +"miniature pinscher" +"Greater Swiss Mountain dog" +"Bernese mountain dog" +"Appenzeller" +"EntleBucher" +"boxer" +"bull mastiff" +"Tibetan mastiff" +"French bulldog" +"Great Dane" +"Saint Bernard, St Bernard" +"Eskimo dog, husky" +"malamute, malemute, Alaskan malamute" +"Siberian husky" +"dalmatian, coach dog, carriage dog" +"affenpinscher, monkey pinscher, monkey dog" +"basenji" +"pug, pug-dog" +"Leonberg" +"Newfoundland, Newfoundland dog" +"Great Pyrenees" +"Samoyed, Samoyede" +"Pomeranian" +"chow, chow chow" +"keeshond" +"Brabancon griffon" +"Pembroke, Pembroke Welsh corgi" +"Cardigan, Cardigan Welsh corgi" +"toy poodle" +"miniature poodle" +"standard poodle" +"Mexican hairless" +"timber wolf, grey wolf, gray wolf, Canis lupus" +"white wolf, Arctic wolf, Canis lupus tundrarum" +"red wolf, maned wolf, Canis rufus, Canis niger" +"coyote, prairie wolf, brush wolf, Canis latrans" +"dingo, warrigal, warragal, Canis dingo" +"dhole, Cuon alpinus" +"African hunting dog, hyena dog, Cape hunting dog, Lycaon pictus" +"hyena, hyaena" +"red fox, Vulpes vulpes" +"kit fox, Vulpes macrotis" +"Arctic fox, white fox, Alopex lagopus" +"grey fox, gray fox, Urocyon cinereoargenteus" +"tabby, tabby cat" +"tiger cat" +"Persian cat" +"Siamese cat, Siamese" +"Egyptian cat" +"cougar, puma, catamount, mountain lion, painter, panther, Felis concolor" +"lynx, catamount" +"leopard, Panthera pardus" +"snow leopard, ounce, Panthera uncia" +"jaguar, panther, Panthera onca, Felis onca" +"lion, king of beasts, Panthera leo" +"tiger, Panthera tigris" +"cheetah, chetah, Acinonyx jubatus" +"brown bear, bruin, Ursus arctos" +"American black bear, black bear, Ursus americanus, Euarctos americanus" +"ice bear, polar bear, Ursus Maritimus, Thalarctos maritimus" +"sloth bear, Melursus ursinus, Ursus ursinus" +"mongoose" +"meerkat, mierkat" +"tiger beetle" +"ladybug, ladybeetle, lady beetle, ladybird, ladybird beetle" +"ground beetle, carabid beetle" +"long-horned beetle, longicorn, longicorn beetle" +"leaf beetle, chrysomelid" +"dung beetle" +"rhinoceros beetle" +"weevil" +"fly" +"bee" +"ant, emmet, pismire" +"grasshopper, hopper" +"cricket" +"walking stick, walkingstick, stick insect" +"cockroach, roach" +"mantis, mantid" +"cicada, cicala" +"leafhopper" +"lacewing, lacewing fly" +"dragonfly, darning needle, devil's darning needle, sewing needle, snake feeder, snake doctor, mosquito hawk, skeeter hawk", +"damselfly" +"admiral" +"ringlet, ringlet butterfly" +"monarch, monarch butterfly, milkweed butterfly, Danaus plexippus" +"cabbage butterfly" +"sulphur butterfly, sulfur butterfly" +"lycaenid, lycaenid butterfly" +"starfish, sea star" +"sea urchin" +"sea cucumber, holothurian" +"wood rabbit, cottontail, cottontail rabbit" +"hare" +"Angora, Angora rabbit" +"hamster" +"porcupine, hedgehog" +"fox squirrel, eastern fox squirrel, Sciurus niger" +"marmot" +"beaver" +"guinea pig, Cavia cobaya" +"sorrel" +"zebra" +"hog, pig, grunter, squealer, Sus scrofa" +"wild boar, boar, Sus scrofa" +"warthog" +"hippopotamus, hippo, river horse, Hippopotamus amphibius" +"ox" +"water buffalo, water ox, Asiatic buffalo, Bubalus bubalis" +"bison" +"ram, tup" +"bighorn, bighorn sheep, cimarron, Rocky Mountain bighorn, Rocky Mountain sheep, Ovis canadensis" +"ibex, Capra ibex" +"hartebeest" +"impala, Aepyceros melampus" +"gazelle" +"Arabian camel, dromedary, Camelus dromedarius" +"llama" +"weasel" +"mink" +"polecat, fitch, foulmart, foumart, Mustela putorius" +"black-footed ferret, ferret, Mustela nigripes" +"otter" +"skunk, polecat, wood pussy" +"badger" +"armadillo" +"three-toed sloth, ai, Bradypus tridactylus" +"orangutan, orang, orangutang, Pongo pygmaeus" +"gorilla, Gorilla gorilla" +"chimpanzee, chimp, Pan troglodytes" +"gibbon, Hylobates lar" +"siamang, Hylobates syndactylus, Symphalangus syndactylus" +"guenon, guenon monkey" +"patas, hussar monkey, Erythrocebus patas" +"baboon" +"macaque" +"langur" +"colobus, colobus monkey" +"proboscis monkey, Nasalis larvatus" +"marmoset" +"capuchin, ringtail, Cebus capucinus" +"howler monkey, howler" +"titi, titi monkey" +"spider monkey, Ateles geoffroyi" +"squirrel monkey, Saimiri sciureus" +"Madagascar cat, ring-tailed lemur, Lemur catta" +"indri, indris, Indri indri, Indri brevicaudatus" +"Indian elephant, Elephas maximus" +"African elephant, Loxodonta africana" +"lesser panda, red panda, panda, bear cat, cat bear, Ailurus fulgens" +"giant panda, panda, panda bear, coon bear, Ailuropoda melanoleuca" +"barracouta, snoek" +"eel" +"coho, cohoe, coho salmon, blue jack, silver salmon, Oncorhynchus kisutch" +"rock beauty, Holocanthus tricolor" +"anemone fish" +"sturgeon" +"gar, garfish, garpike, billfish, Lepisosteus osseus" +"lionfish" +"puffer, pufferfish, blowfish, globefish" +"abacus" +"abaya" +"academic gown, academic robe, judge's robe", +"accordion, piano accordion, squeeze box" +"acoustic guitar" +"aircraft carrier, carrier, flattop, attack aircraft carrier" +"airliner" +"airship, dirigible" +"altar" +"ambulance" +"amphibian, amphibious vehicle" +"analog clock" +"apiary, bee house" +"apron" +"ashcan, trash can, garbage can, wastebin, ash bin, ash-bin, ashbin, dustbin, trash barrel, trash bin" +"assault rifle, assault gun" +"backpack, back pack, knapsack, packsack, rucksack, haversack" +"bakery, bakeshop, bakehouse" +"balance beam, beam" +"balloon" +"ballpoint, ballpoint pen, ballpen, Biro" +"Band Aid" +"banjo" +"bannister, banister, balustrade, balusters, handrail" +"barbell" +"barber chair" +"barbershop" +"barn" +"barometer" +"barrel, cask" +"barrow, garden cart, lawn cart, wheelbarrow" +"baseball" +"basketball" +"bassinet" +"bassoon" +"bathing cap, swimming cap" +"bath towel" +"bathtub, bathing tub, bath, tub" +"beach wagon, station wagon, wagon, estate car, beach waggon, station waggon, waggon" +"beacon, lighthouse, beacon light, pharos" +"beaker" +"bearskin, busby, shako" +"beer bottle" +"beer glass" +"bell cote, bell cot" +"bib" +"bicycle-built-for-two, tandem bicycle, tandem" +"bikini, two-piece" +"binder, ring-binder" +"binoculars, field glasses, opera glasses" +"birdhouse" +"boathouse" +"bobsled, bobsleigh, bob" +"bolo tie, bolo, bola tie, bola" +"bonnet, poke bonnet" +"bookcase" +"bookshop, bookstore, bookstall" +"bottlecap" +"bow" +"bow tie, bow-tie, bowtie" +"brass, memorial tablet, plaque" +"brassiere, bra, bandeau" +"breakwater, groin, groyne, mole, bulwark, seawall, jetty" +"breastplate, aegis, egis" +"broom" +"bucket, pail" +"buckle" +"bulletproof vest" +"bullet train, bullet" +"butcher shop, meat market" +"cab, hack, taxi, taxicab" +"caldron, cauldron" +"candle, taper, wax light" +"cannon" +"canoe" +"can opener, tin opener" +"cardigan" +"car mirror" +"carousel, carrousel, merry-go-round, roundabout, whirligig" +"carpenter's kit, tool kit", +"carton" +"car wheel" +"cash machine, cash dispenser, automated teller machine, automatic teller machine, automated teller, automatic teller, ATM" +"cassette" +"cassette player" +"castle" +"catamaran" +"CD player" +"cello, violoncello" +"cellular telephone, cellular phone, cellphone, cell, mobile phone" +"chain" +"chainlink fence" +"chain mail, ring mail, mail, chain armor, chain armour, ring armor, ring armour" +"chain saw, chainsaw" +"chest" +"chiffonier, commode" +"chime, bell, gong" +"china cabinet, china closet" +"Christmas stocking" +"church, church building" +"cinema, movie theater, movie theatre, movie house, picture palace" +"cleaver, meat cleaver, chopper" +"cliff dwelling" +"cloak" +"clog, geta, patten, sabot" +"cocktail shaker" +"coffee mug" +"coffeepot" +"coil, spiral, volute, whorl, helix" +"combination lock" +"computer keyboard, keypad" +"confectionery, confectionary, candy store" +"container ship, containership, container vessel" +"convertible" +"corkscrew, bottle screw" +"cornet, horn, trumpet, trump" +"cowboy boot" +"cowboy hat, ten-gallon hat" +"cradle" +"crane" +"crash helmet" +"crate" +"crib, cot" +"Crock Pot" +"croquet ball" +"crutch" +"cuirass" +"dam, dike, dyke" +"desk" +"desktop computer" +"dial telephone, dial phone" +"diaper, nappy, napkin" +"digital clock" +"digital watch" +"dining table, board" +"dishrag, dishcloth" +"dishwasher, dish washer, dishwashing machine" +"disk brake, disc brake" +"dock, dockage, docking facility" +"dogsled, dog sled, dog sleigh" +"dome" +"doormat, welcome mat" +"drilling platform, offshore rig" +"drum, membranophone, tympan" +"drumstick" +"dumbbell" +"Dutch oven" +"electric fan, blower" +"electric guitar" +"electric locomotive" +"entertainment center" +"envelope" +"espresso maker" +"face powder" +"feather boa, boa" +"file, file cabinet, filing cabinet" +"fireboat" +"fire engine, fire truck" +"fire screen, fireguard" +"flagpole, flagstaff" +"flute, transverse flute" +"folding chair" +"football helmet" +"forklift" +"fountain" +"fountain pen" +"four-poster" +"freight car" +"French horn, horn" +"frying pan, frypan, skillet" +"fur coat" +"garbage truck, dustcart" +"gasmask, respirator, gas helmet" +"gas pump, gasoline pump, petrol pump, island dispenser" +"goblet" +"go-kart" +"golf ball" +"golfcart, golf cart" +"gondola" +"gong, tam-tam" +"gown" +"grand piano, grand" +"greenhouse, nursery, glasshouse" +"grille, radiator grille" +"grocery store, grocery, food market, market" +"guillotine" +"hair slide" +"hair spray" +"half track" +"hammer" +"hamper" +"hand blower, blow dryer, blow drier, hair dryer, hair drier" +"hand-held computer, hand-held microcomputer" +"handkerchief, hankie, hanky, hankey" +"hard disc, hard disk, fixed disk" +"harmonica, mouth organ, harp, mouth harp" +"harp" +"harvester, reaper" +"hatchet" +"holster" +"home theater, home theatre" +"honeycomb" +"hook, claw" +"hoopskirt, crinoline" +"horizontal bar, high bar" +"horse cart, horse-cart" +"hourglass" +"iPod" +"iron, smoothing iron" +"jack-o'-lantern", +"jean, blue jean, denim" +"jeep, landrover" +"jersey, T-shirt, tee shirt" +"jigsaw puzzle" +"jinrikisha, ricksha, rickshaw" +"joystick" +"kimono" +"knee pad" +"knot" +"lab coat, laboratory coat" +"ladle" +"lampshade, lamp shade" +"laptop, laptop computer" +"lawn mower, mower" +"lens cap, lens cover" +"letter opener, paper knife, paperknife" +"library" +"lifeboat" +"lighter, light, igniter, ignitor" +"limousine, limo" +"liner, ocean liner" +"lipstick, lip rouge" +"Loafer" +"lotion" +"loudspeaker, speaker, speaker unit, loudspeaker system, speaker system" +"loupe, jeweler's loupe", +"lumbermill, sawmill" +"magnetic compass" +"mailbag, postbag" +"mailbox, letter box" +"maillot" +"maillot, tank suit" +"manhole cover" +"maraca" +"marimba, xylophone" +"mask" +"matchstick" +"maypole" +"maze, labyrinth" +"measuring cup" +"medicine chest, medicine cabinet" +"megalith, megalithic structure" +"microphone, mike" +"microwave, microwave oven" +"military uniform" +"milk can" +"minibus" +"miniskirt, mini" +"minivan" +"missile" +"mitten" +"mixing bowl" +"mobile home, manufactured home" +"Model T" +"modem" +"monastery" +"monitor" +"moped" +"mortar" +"mortarboard" +"mosque" +"mosquito net" +"motor scooter, scooter" +"mountain bike, all-terrain bike, off-roader" +"mountain tent" +"mouse, computer mouse" +"mousetrap" +"moving van" +"muzzle" +"nail" +"neck brace" +"necklace" +"nipple" +"notebook, notebook computer" +"obelisk" +"oboe, hautboy, hautbois" +"ocarina, sweet potato" +"odometer, hodometer, mileometer, milometer" +"oil filter" +"organ, pipe organ" +"oscilloscope, scope, cathode-ray oscilloscope, CRO" +"overskirt" +"oxcart" +"oxygen mask" +"packet" +"paddle, boat paddle" +"paddlewheel, paddle wheel" +"padlock" +"paintbrush" +"pajama, pyjama, pj's, jammies", +"palace" +"panpipe, pandean pipe, syrinx" +"paper towel" +"parachute, chute" +"parallel bars, bars" +"park bench" +"parking meter" +"passenger car, coach, carriage" +"patio, terrace" +"pay-phone, pay-station" +"pedestal, plinth, footstall" +"pencil box, pencil case" +"pencil sharpener" +"perfume, essence" +"Petri dish" +"photocopier" +"pick, plectrum, plectron" +"pickelhaube" +"picket fence, paling" +"pickup, pickup truck" +"pier" +"piggy bank, penny bank" +"pill bottle" +"pillow" +"ping-pong ball" +"pinwheel" +"pirate, pirate ship" +"pitcher, ewer" +"plane, carpenter's plane, woodworking plane", +"planetarium" +"plastic bag" +"plate rack" +"plow, plough" +"plunger, plumber's helper", +"Polaroid camera, Polaroid Land camera" +"pole" +"police van, police wagon, paddy wagon, patrol wagon, wagon, black Maria" +"poncho" +"pool table, billiard table, snooker table" +"pop bottle, soda bottle" +"pot, flowerpot" +"potter's wheel", +"power drill" +"prayer rug, prayer mat" +"printer" +"prison, prison house" +"projectile, missile" +"projector" +"puck, hockey puck" +"punching bag, punch bag, punching ball, punchball" +"purse" +"quill, quill pen" +"quilt, comforter, comfort, puff" +"racer, race car, racing car" +"racket, racquet" +"radiator" +"radio, wireless" +"radio telescope, radio reflector" +"rain barrel" +"recreational vehicle, RV, R.V." +"reel" +"reflex camera" +"refrigerator, icebox" +"remote control, remote" +"restaurant, eating house, eating place, eatery" +"revolver, six-gun, six-shooter" +"rifle" +"rocking chair, rocker" +"rotisserie" +"rubber eraser, rubber, pencil eraser" +"rugby ball" +"rule, ruler" +"running shoe" +"safe" +"safety pin" +"saltshaker, salt shaker" +"sandal" +"sarong" +"sax, saxophone" +"scabbard" +"scale, weighing machine" +"school bus" +"schooner" +"scoreboard" +"screen, CRT screen" +"screw" +"screwdriver" +"seat belt, seatbelt" +"sewing machine" +"shield, buckler" +"shoe shop, shoe-shop, shoe store" +"shoji" +"shopping basket" +"shopping cart" +"shovel" +"shower cap" +"shower curtain" +"ski" +"ski mask" +"sleeping bag" +"slide rule, slipstick" +"sliding door" +"slot, one-armed bandit" +"snorkel" +"snowmobile" +"snowplow, snowplough" +"soap dispenser" +"soccer ball" +"sock" +"solar dish, solar collector, solar furnace" +"sombrero" +"soup bowl" +"space bar" +"space heater" +"space shuttle" +"spatula" +"speedboat" +"spider web, spider's web", +"spindle" +"sports car, sport car" +"spotlight, spot" +"stage" +"steam locomotive" +"steel arch bridge" +"steel drum" +"stethoscope" +"stole" +"stone wall" +"stopwatch, stop watch" +"stove" +"strainer" +"streetcar, tram, tramcar, trolley, trolley car" +"stretcher" +"studio couch, day bed" +"stupa, tope" +"submarine, pigboat, sub, U-boat" +"suit, suit of clothes" +"sundial" +"sunglass" +"sunglasses, dark glasses, shades" +"sunscreen, sunblock, sun blocker" +"suspension bridge" +"swab, swob, mop" +"sweatshirt" +"swimming trunks, bathing trunks" +"swing" +"switch, electric switch, electrical switch" +"syringe" +"table lamp" +"tank, army tank, armored combat vehicle, armoured combat vehicle" +"tape player" +"teapot" +"teddy, teddy bear" +"television, television system" +"tennis ball" +"thatch, thatched roof" +"theater curtain, theatre curtain" +"thimble" +"thresher, thrasher, threshing machine" +"throne" +"tile roof" +"toaster" +"tobacco shop, tobacconist shop, tobacconist" +"toilet seat" +"torch" +"totem pole" +"tow truck, tow car, wrecker" +"toyshop" +"tractor" +"trailer truck, tractor trailer, trucking rig, rig, articulated lorry, semi" +"tray" +"trench coat" +"tricycle, trike, velocipede" +"trimaran" +"tripod" +"triumphal arch" +"trolleybus, trolley coach, trackless trolley" +"trombone" +"tub, vat" +"turnstile" +"typewriter keyboard" +"umbrella" +"unicycle, monocycle" +"upright, upright piano" +"vacuum, vacuum cleaner" +"vase" +"vault" +"velvet" +"vending machine" +"vestment" +"viaduct" +"violin, fiddle" +"volleyball" +"waffle iron" +"wall clock" +"wallet, billfold, notecase, pocketbook" +"wardrobe, closet, press" +"warplane, military plane" +"washbasin, handbasin, washbowl, lavabo, wash-hand basin" +"washer, automatic washer, washing machine" +"water bottle" +"water jug" +"water tower" +"whiskey jug" +"whistle" +"wig" +"window screen" +"window shade" +"Windsor tie" +"wine bottle" +"wing" +"wok" +"wooden spoon" +"wool, woolen, woollen" +"worm fence, snake fence, snake-rail fence, Virginia fence" +"wreck" +"yawl" +"yurt" +"web site, website, internet site, site" +"comic book" +"crossword puzzle, crossword" +"street sign" +"traffic light, traffic signal, stoplight" +"book jacket, dust cover, dust jacket, dust wrapper" +"menu" +"plate" +"guacamole" +"consomme" +"hot pot, hotpot" +"trifle" +"ice cream, icecream" +"ice lolly, lolly, lollipop, popsicle" +"French loaf" +"bagel, beigel" +"pretzel" +"cheeseburger" +"hotdog, hot dog, red hot" +"mashed potato" +"head cabbage" +"broccoli" +"cauliflower" +"zucchini, courgette" +"spaghetti squash" +"acorn squash" +"butternut squash" +"cucumber, cuke" +"artichoke, globe artichoke" +"bell pepper" +"cardoon" +"mushroom" +"Granny Smith" +"strawberry" +"orange" +"lemon" +"fig" +"pineapple, ananas" +"banana" +"jackfruit, jak, jack" +"custard apple" +"pomegranate" +"hay" +"carbonara" +"chocolate sauce, chocolate syrup" +"dough" +"meat loaf, meatloaf" +"pizza, pizza pie" +"potpie" +"burrito" +"red wine" +"espresso" +"cup" +"eggnog" +"alp" +"bubble" +"cliff, drop, drop-off" +"coral reef" +"geyser" +"lakeside, lakeshore" +"promontory, headland, head, foreland" +"sandbar, sand bar" +"seashore, coast, seacoast, sea-coast" +"valley, vale" +"volcano" +"ballplayer, baseball player" +"groom, bridegroom" +"scuba diver" +"rapeseed" +"daisy" +"yellow lady's slipper, yellow lady-slipper, Cypripedium calceolus, Cypripedium parviflorum", +"corn" +"acorn" +"hip, rose hip, rosehip" +"buckeye, horse chestnut, conker" +"coral fungus" +"agaric" +"gyromitra" +"stinkhorn, carrion fungus" +"earthstar" +"hen-of-the-woods, hen of the woods, Polyporus frondosus, Grifola frondosa" +"bolete" +"ear, spike, capitulum" +"toilet tissue, toilet paper, bathroom tissue" \ No newline at end of file diff --git a/android/example_app/style-transfer-with-nnstreamer-java-api/src/main/java/org/nnsuite/nnstreamer/sample/MXNetActivity.java b/android/example_app/style-transfer-with-nnstreamer-java-api/src/main/java/org/nnsuite/nnstreamer/sample/MXNetActivity.java new file mode 100644 index 00000000..fb6907ef --- /dev/null +++ b/android/example_app/style-transfer-with-nnstreamer-java-api/src/main/java/org/nnsuite/nnstreamer/sample/MXNetActivity.java @@ -0,0 +1,395 @@ +package org.nnsuite.nnstreamer.sample; + +import android.Manifest; +import android.app.Activity; +import android.content.pm.PackageManager; +import android.content.res.AssetManager; +import android.graphics.ImageFormat; +import android.hardware.Camera; +import android.support.annotation.NonNull; +import android.support.v4.app.ActivityCompat; +import android.support.v4.content.ContextCompat; +import android.support.v7.app.AppCompatActivity; +import android.os.Bundle; +import android.util.Log; +import android.view.SurfaceHolder; +import android.view.SurfaceView; +import android.widget.TextView; + +import org.nnsuite.nnstreamer.NNStreamer; +import org.nnsuite.nnstreamer.Pipeline; +import org.nnsuite.nnstreamer.TensorsData; +import org.nnsuite.nnstreamer.TensorsInfo; + +import java.io.BufferedReader; +import java.io.File; +import java.io.FileNotFoundException; +import java.io.FileOutputStream; +import java.io.FileReader; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; +import java.nio.file.Files; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + + +public class MXNetActivity extends Activity { + private static final String TAG = "NNStreamer-JAVA-Inception-Sample"; + private static final int PERMISSION_REQUEST_CODE = 3; + private static final String[] requiredPermissions = new String[] { + Manifest.permission.CAMERA, + Manifest.permission.WRITE_EXTERNAL_STORAGE, + Manifest.permission.READ_EXTERNAL_STORAGE + }; + private boolean initialized = false; + + private SurfaceView mCameraView; + private SurfaceView mResultView; + private TextView mTextView; + private Camera mCamera; + + private Pipeline currentPipe; + private File mxnetModel; + private File labelFile; + private SurfaceHolder.Callback prevCameraCallback; + private SurfaceHolder.Callback prevScaledCallback; + String path; + + private int updateFrame = 0; + private int updateLimit = 60; + + private ArrayList textLabels = new ArrayList<>(); + + /** + * Initialize NNStreamer. + */ + private void initNNStreamer() { + if (initialized) { + return; + } + try { + initialized = NNStreamer.initialize(this); + } catch(Exception e) { + e.printStackTrace(); + Log.e(TAG, e.getMessage()); + } finally { + if (initialized) { + Log.i(TAG, "Version: " + NNStreamer.getVersion()); + } else { + Log.e(TAG, "Failed to initialize NNStreamer"); + finish(); + } + } + } + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + initNNStreamer(); + + setContentView(R.layout.activity_mxnet); + mCameraView = findViewById(R.id.cameraView); + mResultView = findViewById(R.id.resultView); + mTextView = findViewById(R.id.textView); + + /* check permissions */ + for (String permission : requiredPermissions) { + if (!checkPermission(permission)) { + ActivityCompat.requestPermissions(this, + requiredPermissions, PERMISSION_REQUEST_CODE); + return; + } + } + + preparePreview(); + } + + @Override + protected void onResume() { + super.onResume(); + + if (getCurrentPipe() != null) { + getCurrentPipe().start(); + } + } + + @Override + protected void onPause() { + super.onPause(); + + if (getCurrentPipe() != null) { + getCurrentPipe().stop(); + } + } + + @Override + protected void onDestroy() { + super.onDestroy(); + + if (getCurrentPipe() != null) { + getCurrentPipe().close(); + currentPipe = null; + } + + if (mCamera != null) { + mCamera.stopPreview(); + mCamera.setPreviewCallback(null); + mCamera.release(); + mCamera = null; + } + } + + /** + * Check the permission is granted. + */ + private boolean checkPermission(final String permission) { + return (ContextCompat.checkSelfPermission(this, permission) + == PackageManager.PERMISSION_GRANTED); + } + + @Override + public void onRequestPermissionsResult(int requestCode, + @NonNull String permissions[], @NonNull int[] grantResults) { + if (requestCode == PERMISSION_REQUEST_CODE) { + for (int grant : grantResults) { + if (grant != PackageManager.PERMISSION_GRANTED) { + Log.i(TAG, "Permission denied, close app."); + finish(); + return; + } + } + return; + } + finish(); + } + + public static boolean isValidBuffer(ByteBuffer buffer, int expected) { + if (buffer != null && buffer.isDirect() && buffer.order() == ByteOrder.nativeOrder()) { + int capacity = buffer.capacity(); + + return (capacity == expected); + } + + return false; + } + + /** + * Prepare camera preview. + */ + private void preparePreview() { + copyFilesToExternalDir(); + path = getExternalFilesDir(null).getAbsolutePath(); + mxnetModel = new File(path+"/Inception-BN.json"); + labelFile = new File(path+"/labels.txt"); + + currentPipe = new Pipeline(getDesc()); + mCamera = Camera.open(); + + resetView(); + resetCamera(); + + mCamera.setPreviewCallback(getNewPreviewCallback()); + + // Read text labels + try { + FileReader fr = new FileReader(labelFile); + BufferedReader reader = new BufferedReader(fr); + String name; + while ((name = reader.readLine()) != null) { + textLabels.add(name); + } + } catch (FileNotFoundException e) { + e.printStackTrace(); + } catch (IOException e) { + e.printStackTrace(); + } + + currentPipe.registerSinkCallback("sinkx", new Pipeline.NewDataCallback() { + @Override + public void onNewDataReceived(TensorsData data) { + if (data == null || data.getTensorsCount() != 1) { + return; + } + + ByteBuffer buffer = data.getTensorData(0); + if (isValidBuffer(buffer, 4)) { + final int index = buffer.getInt(0); + runOnUiThread(new Runnable() { + @Override + public void run() { + mTextView.setText(textLabels.get(index)); + } + }); + } + } + }); + } + + private void copyFilesToExternalDir() + { + AssetManager am = getResources().getAssets(); + String[] files = null; + + try { + files = am.list("models/"); + } catch (Exception e) { + Log.e("TAG", "#### Failed to get asset file list"); + e.printStackTrace(); + return; + } + + // Copy files into app-specific directory. + for (String filename : files) { + try { + InputStream in = am.open("models/" + filename); + String outDir = getExternalFilesDir(null).getAbsolutePath(); + File outFile = new File(outDir, filename); + OutputStream out = new FileOutputStream(outFile); + + byte[] buffer = new byte[1024]; + int read; + while ((read = in.read(buffer)) != -1) { + out.write(buffer, 0, read); + } + + in.close(); + out.flush(); + out.close(); + } catch (IOException e) { + Log.e("TAG", "Failed to copy file: " + filename); + e.printStackTrace(); + return; + } + } + } + + private void resetView() { + prevCameraCallback = getNewCameraCallback(); + mCameraView.getHolder().addCallback(prevCameraCallback); + + prevScaledCallback = getNewScaledCallback(); + mResultView.getHolder().addCallback(prevScaledCallback); + } + + private void resetCamera() + { + Camera.Parameters parameters = mCamera.getParameters(); + List focusModes = parameters.getSupportedFocusModes(); + if (focusModes.contains(Camera.Parameters.FOCUS_MODE_CONTINUOUS_PICTURE)){ + Log.d(TAG, "Set FOCUS_MODE_CONTINUOUS_PICTURE"); + parameters.setFocusMode(Camera.Parameters.FOCUS_MODE_CONTINUOUS_PICTURE); + } + + parameters.setPreviewSize(640, 480); + parameters.setPreviewFormat(ImageFormat.NV21); + parameters.setPreviewFrameRate(30); + + mCamera.setParameters(parameters); + mCamera.setDisplayOrientation(90); + } + + private SurfaceHolder.Callback getNewCameraCallback() + { + return new SurfaceHolder.Callback() { + @Override + public void surfaceCreated(SurfaceHolder holder) { + Log.d(TAG, "Preview surface created"); + } + + @Override + public void surfaceChanged(SurfaceHolder holder, int format, int width, int height) { + Log.d(TAG, "Preview surface changed"); + try { + mCamera.stopPreview(); + mCamera.setPreviewDisplay(holder); + mCamera.setPreviewCallback(getNewPreviewCallback()); + mCamera.startPreview(); + Log.d(TAG, "Preview resumed."); + } catch (Exception e) { + Log.e(TAG, "Error on starting camera preview: " + e.getMessage()); + e.printStackTrace(); + } + } + + @Override + public void surfaceDestroyed(SurfaceHolder holder) { + Log.d(TAG, "Preview surface destroyed"); + if (mCamera != null) { + mCamera.stopPreview(); + } + } + }; + } + + private SurfaceHolder.Callback getNewScaledCallback() + { + return new SurfaceHolder.Callback() { + @Override + public void surfaceCreated(SurfaceHolder holder) { + Log.d(TAG, "ResultView surface created"); + } + + @Override + public void surfaceChanged(SurfaceHolder holder, int format, int width, int height) { + Log.d(TAG, "ResultView surface changed"); + getCurrentPipe().setSurface("sink_result", holder.getSurface()); + } + + @Override + public void surfaceDestroyed(SurfaceHolder holder) { + Log.d(TAG, "ResultView surface destroyed"); + } + }; + } + + private Camera.PreviewCallback getNewPreviewCallback() + { + return new Camera.PreviewCallback() { + @Override + public void onPreviewFrame(byte[] data, Camera camera) { + updateFrame += 1; + if(updateFrame == 1) + { + TensorsInfo info = new TensorsInfo(); + info.addTensorInfo(NNStreamer.TensorType.UINT8, new int[]{3,640,480,1}); + TensorsData input = info.allocate(); + ByteBuffer buffer = input.getTensorData(0); + buffer.put(Arrays.copyOf(data, data.length)); + input.setTensorData(0, buffer); + getCurrentPipe().inputData("srcx", input); + + getCurrentPipe().stop(); + } + if(updateFrame > updateLimit) + { + currentPipe.start(); + updateFrame = 0; + } + } + }; + } + + private Pipeline getCurrentPipe() + { + return currentPipe; + } + + private String getDesc() + { + String desc = "appsrc name=srcx ! " + + "video/x-raw,format=NV21,width=640,height=480,framerate=(fraction)0/1 ! tee name=t_raw " + + "t_raw. ! queue ! videoflip method=clockwise ! glimagesink name=sink_result " + + "t_raw. ! queue ! videoconvert ! video/x-raw,format=RGB,width=640,height=480,framerate=(fraction)0/1 ! videoscale ! video/x-raw,format=RGB,width=224,height=224 ! tensor_converter ! " + + "tensor_transform mode=arithmetic option=typecast:float32,per-channel:true@0,add:-123.68@0,add:-116.779@1,add:-103.939@2 ! " + + "tensor_transform mode=dimchg option=0:2 ! " + + "tensor_filter framework=mxnet model=" + mxnetModel.getAbsolutePath() + " input=1:3:224:224 inputtype=float32 inputname=data output=1 outputtype=float32 outputname=argmax_channel custom=input_rank=4,enable_tensorrt=false latency=1 ! " + + "tensor_transform mode=arithmetic option=typecast:int32,add:0 acceleration=false !" + + "tensor_sink name=sinkx"; + + return desc; + } +} diff --git a/android/example_app/style-transfer-with-nnstreamer-java-api/src/main/java/org/nnsuite/nnstreamer/sample/MainActivity.java b/android/example_app/style-transfer-with-nnstreamer-java-api/src/main/java/org/nnsuite/nnstreamer/sample/MainActivity.java index 762f4ba3..df5e497f 100644 --- a/android/example_app/style-transfer-with-nnstreamer-java-api/src/main/java/org/nnsuite/nnstreamer/sample/MainActivity.java +++ b/android/example_app/style-transfer-with-nnstreamer-java-api/src/main/java/org/nnsuite/nnstreamer/sample/MainActivity.java @@ -1,385 +1,30 @@ package org.nnsuite.nnstreamer.sample; -import android.Manifest; import android.app.Activity; -import android.content.pm.PackageManager; -import android.content.res.AssetManager; -import android.graphics.ImageFormat; -import android.hardware.Camera; +import android.content.Intent; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.v4.app.ActivityCompat; -import android.support.v4.content.ContextCompat; -import android.util.Log; -import android.view.SurfaceHolder; -import android.view.SurfaceView; - -import org.nnsuite.nnstreamer.NNStreamer; -import org.nnsuite.nnstreamer.Pipeline; -import org.nnsuite.nnstreamer.TensorsData; -import org.nnsuite.nnstreamer.TensorsInfo; - -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; -import java.nio.ByteBuffer; -import java.util.Arrays; -import java.util.List; -import java.io.File; - -import java.nio.file.Files; +import android.view.View; /** * Sample code to run the application with nnstreamer-api. * Before building this sample, copy nnstreamer-api library file (nnstreamer-YYYY-MM-DD.aar) into 'libs' directory. */ public class MainActivity extends Activity { - private static final String TAG = "NNStreamer-JAVA-StyleTransfer-Sample"; - private static final int PERMISSION_REQUEST_CODE = 3; - private static final String[] requiredPermissions = new String[] { - Manifest.permission.CAMERA, - Manifest.permission.WRITE_EXTERNAL_STORAGE, - Manifest.permission.READ_EXTERNAL_STORAGE - }; - private boolean initialized = false; - - private SurfaceView mCameraView; - private SurfaceView mStyledView; - private Camera mCamera; - - private Pipeline currentPipe; - private File predictModel; - private File transferModel; - private SurfaceHolder.Callback prevCameraCallback; - private SurfaceHolder.Callback prevScaledCallback; - String path; - - private int updateFrame = 0; - private int styleFrame = 0; - private int updateLimit = 25; - private int styleNumber = 0; - - /** - * Initialize NNStreamer. - */ - private void initNNStreamer() { - if (initialized) { - return; - } - try { - initialized = NNStreamer.initialize(this); - } catch(Exception e) { - e.printStackTrace(); - Log.e(TAG, e.getMessage()); - } finally { - if (initialized) { - Log.i(TAG, "Version: " + NNStreamer.getVersion()); - } else { - Log.e(TAG, "Failed to initialize NNStreamer"); - finish(); - } - } - } @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); - initNNStreamer(); - setContentView(R.layout.activity_main); - mCameraView = findViewById(R.id.cameraView); - mStyledView = findViewById(R.id.styled_result); - - /* check permissions */ - for (String permission : requiredPermissions) { - if (!checkPermission(permission)) { - ActivityCompat.requestPermissions(this, - requiredPermissions, PERMISSION_REQUEST_CODE); - return; - } - } - - preparePreview(); - } - - @Override - protected void onResume() { - super.onResume(); - - if (getCurrentPipe() != null) { - getCurrentPipe().start(); - } - } - - @Override - protected void onPause() { - super.onPause(); - - if (getCurrentPipe() != null) { - getCurrentPipe().stop(); - } - } - - @Override - protected void onDestroy() { - super.onDestroy(); - - if (getCurrentPipe() != null) { - getCurrentPipe().close(); - currentPipe = null; - } - - if (mCamera != null) { - mCamera.stopPreview(); - mCamera.setPreviewCallback(null); - mCamera.release(); - mCamera = null; - } - } - - /** - * Check the permission is granted. - */ - private boolean checkPermission(final String permission) { - return (ContextCompat.checkSelfPermission(this, permission) - == PackageManager.PERMISSION_GRANTED); - } - - @Override - public void onRequestPermissionsResult(int requestCode, - @NonNull String permissions[], @NonNull int[] grantResults) { - if (requestCode == PERMISSION_REQUEST_CODE) { - for (int grant : grantResults) { - if (grant != PackageManager.PERMISSION_GRANTED) { - Log.i(TAG, "Permission denied, close app."); - finish(); - return; - } - } - return; - } - finish(); - } - /** - * Prepare camera preview. - */ - private void preparePreview() { - copyFilesToExternalDir(); - path = getExternalFilesDir(null).getAbsolutePath(); - predictModel = new File(path+"/style_predict_quantized_256.tflite"); - transferModel = new File(path+"/style_transfer_quantized_384.tflite"); - - currentPipe = new Pipeline(getDesc()); - mCamera = Camera.open(); - - resetView(); - resetCamera(); - } - - private void copyFilesToExternalDir() - { - AssetManager am = getResources().getAssets(); - String[] files = null; - - try { - files = am.list("models/"); - } catch (Exception e) { - Log.e("TAG", "#### Failed to get asset file list"); - e.printStackTrace(); - return; - } - - // Copy files into app-specific directory. - for (String filename : files) { - try { - InputStream in = am.open("models/" + filename); - String outDir = getExternalFilesDir(null).getAbsolutePath(); - File outFile = new File(outDir, filename); - OutputStream out = new FileOutputStream(outFile); - - byte[] buffer = new byte[1024]; - int read; - while ((read = in.read(buffer)) != -1) { - out.write(buffer, 0, read); - } - - in.close(); - out.flush(); - out.close(); - } catch (IOException e) { - Log.e("TAG", "Failed to copy file: " + filename); - e.printStackTrace(); - return; - } - } - } - - private void resetView() { - prevCameraCallback = getNewCameraCallback(); - mCameraView.getHolder().addCallback(prevCameraCallback); - - prevScaledCallback = getNewScaledCallback(); - mStyledView.getHolder().addCallback(prevScaledCallback); - } - - private void resetCamera() - { - Camera.Parameters parameters = mCamera.getParameters(); - List focusModes = parameters.getSupportedFocusModes(); - if (focusModes.contains(Camera.Parameters.FOCUS_MODE_CONTINUOUS_PICTURE)){ - Log.d(TAG, "Set FOCUS_MODE_CONTINUOUS_PICTURE"); - parameters.setFocusMode(Camera.Parameters.FOCUS_MODE_CONTINUOUS_PICTURE); - } - - parameters.setPreviewSize(640, 480); - parameters.setPreviewFormat(ImageFormat.NV21); - parameters.setPreviewFrameRate(30); - - mCamera.setParameters(parameters); - mCamera.setDisplayOrientation(90); } - private SurfaceHolder.Callback getNewCameraCallback() - { - return new SurfaceHolder.Callback() { - @Override - public void surfaceCreated(SurfaceHolder holder) { - Log.d(TAG, "Preview surface created"); - } - - @Override - public void surfaceChanged(SurfaceHolder holder, int format, int width, int height) { - Log.d(TAG, "Preview surface changed"); - try { - mCamera.stopPreview(); - mCamera.setPreviewDisplay(holder); - mCamera.setPreviewCallback(getNewPreviewCallback()); - mCamera.startPreview(); - Log.d(TAG, "Preview resumed."); - } catch (Exception e) { - Log.e(TAG, "Error on starting camera preview: " + e.getMessage()); - e.printStackTrace(); - } - } - - @Override - public void surfaceDestroyed(SurfaceHolder holder) { - Log.d(TAG, "Preview surface destroyed"); - if (mCamera != null) { - mCamera.stopPreview(); - } - } - }; - } - - private SurfaceHolder.Callback getNewScaledCallback() - { - return new SurfaceHolder.Callback() { - @Override - public void surfaceCreated(SurfaceHolder holder) { - Log.d(TAG, "Styledview surface created"); - } - - @Override - public void surfaceChanged(SurfaceHolder holder, int format, int width, int height) { - Log.d(TAG, "Styledview surface changed"); - getCurrentPipe().setSurface("sinkstyled", holder.getSurface()); - } - - @Override - public void surfaceDestroyed(SurfaceHolder holder) { - Log.d(TAG, "Styledview surface destroyed"); - } - }; - } - - private Camera.PreviewCallback getNewPreviewCallback() - { - return new Camera.PreviewCallback() { - @Override - public void onPreviewFrame(byte[] data, Camera camera) { - updateFrame += 1; - styleFrame += 1; - if(updateFrame == 1) - { - TensorsInfo info = new TensorsInfo(); - info.addTensorInfo(NNStreamer.TensorType.UINT8, new int[]{3,640,480,1}); - TensorsData input = info.allocate(); - ByteBuffer buffer = input.getTensorData(0); - buffer.put(Arrays.copyOf(data, data.length)); - input.setTensorData(0, buffer); - getCurrentPipe().inputData("srcx", input); - - TensorsInfo info1 = new TensorsInfo(); - info1.addTensorInfo(NNStreamer.TensorType.UINT8, new int[]{3,256,256,1}); - TensorsData input1 = info1.allocate(); - ByteBuffer buffer1 = input1.getTensorData(0); - byte[] data1 = null; - try { - data1 = Files.readAllBytes(getCurrentStyleRawImage().toPath()); - } - catch (Exception e) - { - e.printStackTrace(); - } - buffer1.put(Arrays.copyOf(data1, data1.length)); - input1.setTensorData(0, buffer1); - getCurrentPipe().inputData("src1", input1); - - getCurrentPipe().stop(); - } - if(updateFrame > updateLimit) - { - currentPipe.start(); - updateFrame = 0; - } - if(styleFrame > 300) - { - styleNumber++; - Log.d(TAG, "#### update style to style "+styleNumber+"."); - styleFrame = 0; - updateFrame -= 10; - } - } - }; - } - - private Pipeline getCurrentPipe() - { - return currentPipe; - } - - private String getDesc() - { - String desc = "appsrc name=srcx ! " + - "video/x-raw,format=NV21,width=640,height=480,framerate=(fraction)0/1 ! " + - "videoconvert ! " + - "video/x-raw,format=RGB,width=640,height=480,framerate=(fraction)0/1 ! " + - "videoflip method=clockwise ! videocrop left=0 right=0 top=80 bottom=80 ! " + - "videoscale ! video/x-raw,width=384,height=384 ! tensor_converter ! " + - "other/tensor,dimension=(string)3:384:384:1,type=(string)uint8,framerate=(fraction)0/1 ! " + - "tensor_transform mode=arithmetic option=typecast:float32,add:0.0,div:255.0 ! mux.sink_0 "+ - "appsrc name=src1 ! " + - "other/tensor,dimension=(string)3:256:256:1,type=(string)uint8,framerate=(fraction)0/1 ! " + - "tensor_transform mode=arithmetic option=typecast:float32,add:0.0,div:255.0 ! " + - "tensor_filter framework=tensorflow-lite model=" + predictModel.getAbsolutePath() + " ! " + - "mux.sink_1 " + - "tensor_mux name=mux sync_mode=nosync ! tensor_filter framework=tensorflow-lite model=" + transferModel.getAbsolutePath() +" ! " + - "tensor_transform mode=arithmetic option=mul:255.0,add:0.0 ! " + - "tensor_transform mode=typecast option=uint8 ! " + - "tensor_decoder mode=direct_video ! " + - "videoconvert ! " + - "video/x-raw,format=RGB,width=384,height=384,framerate=(fraction)0/1 ! " + - "glimagesink name=sinkstyled"; - - return desc; + public void onTFLiteButtonClicked(View view) { + Intent intent = new Intent(getApplicationContext(), TFLiteActivity.class); + startActivity(intent); } - private File getCurrentStyleRawImage() - { - String path = getExternalFilesDir(null).getAbsolutePath(); - return new File(path+"/style"+styleNumber+".raw"); + public void onMXNetButtonClicked(View view) { + Intent intent = new Intent(getApplicationContext(), MXNetActivity.class); + startActivity(intent); } } diff --git a/android/example_app/style-transfer-with-nnstreamer-java-api/src/main/java/org/nnsuite/nnstreamer/sample/TFLiteActivity.java b/android/example_app/style-transfer-with-nnstreamer-java-api/src/main/java/org/nnsuite/nnstreamer/sample/TFLiteActivity.java new file mode 100644 index 00000000..2a6f3c11 --- /dev/null +++ b/android/example_app/style-transfer-with-nnstreamer-java-api/src/main/java/org/nnsuite/nnstreamer/sample/TFLiteActivity.java @@ -0,0 +1,385 @@ +package org.nnsuite.nnstreamer.sample; + +import android.Manifest; +import android.app.Activity; +import android.content.pm.PackageManager; +import android.content.res.AssetManager; +import android.graphics.ImageFormat; +import android.hardware.Camera; +import android.os.Bundle; +import android.support.annotation.NonNull; +import android.support.v4.app.ActivityCompat; +import android.support.v4.content.ContextCompat; +import android.util.Log; +import android.view.SurfaceHolder; +import android.view.SurfaceView; + +import org.nnsuite.nnstreamer.NNStreamer; +import org.nnsuite.nnstreamer.Pipeline; +import org.nnsuite.nnstreamer.TensorsData; +import org.nnsuite.nnstreamer.TensorsInfo; + +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.nio.ByteBuffer; +import java.util.Arrays; +import java.util.List; +import java.io.File; + +import java.nio.file.Files; + +/** + * Sample code to run the application with nnstreamer-api. + * Before building this sample, copy nnstreamer-api library file (nnstreamer-YYYY-MM-DD.aar) into 'libs' directory. + */ +public class TFLiteActivity extends Activity { + private static final String TAG = "NNStreamer-JAVA-StyleTransfer-Sample"; + private static final int PERMISSION_REQUEST_CODE = 3; + private static final String[] requiredPermissions = new String[] { + Manifest.permission.CAMERA, + Manifest.permission.WRITE_EXTERNAL_STORAGE, + Manifest.permission.READ_EXTERNAL_STORAGE + }; + private boolean initialized = false; + + private SurfaceView mCameraView; + private SurfaceView mStyledView; + private Camera mCamera; + + private Pipeline currentPipe; + private File predictModel; + private File transferModel; + private SurfaceHolder.Callback prevCameraCallback; + private SurfaceHolder.Callback prevScaledCallback; + String path; + + private int updateFrame = 0; + private int styleFrame = 0; + private int updateLimit = 25; + private int styleNumber = 0; + + /** + * Initialize NNStreamer. + */ + private void initNNStreamer() { + if (initialized) { + return; + } + try { + initialized = NNStreamer.initialize(this); + } catch(Exception e) { + e.printStackTrace(); + Log.e(TAG, e.getMessage()); + } finally { + if (initialized) { + Log.i(TAG, "Version: " + NNStreamer.getVersion()); + } else { + Log.e(TAG, "Failed to initialize NNStreamer"); + finish(); + } + } + } + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + initNNStreamer(); + + setContentView(R.layout.activity_tflite); + mCameraView = findViewById(R.id.cameraView); + mStyledView = findViewById(R.id.styled_result); + + /* check permissions */ + for (String permission : requiredPermissions) { + if (!checkPermission(permission)) { + ActivityCompat.requestPermissions(this, + requiredPermissions, PERMISSION_REQUEST_CODE); + return; + } + } + + preparePreview(); + } + + @Override + protected void onResume() { + super.onResume(); + + if (getCurrentPipe() != null) { + getCurrentPipe().start(); + } + } + + @Override + protected void onPause() { + super.onPause(); + + if (getCurrentPipe() != null) { + getCurrentPipe().stop(); + } + } + + @Override + protected void onDestroy() { + super.onDestroy(); + + if (getCurrentPipe() != null) { + getCurrentPipe().close(); + currentPipe = null; + } + + if (mCamera != null) { + mCamera.stopPreview(); + mCamera.setPreviewCallback(null); + mCamera.release(); + mCamera = null; + } + } + + /** + * Check the permission is granted. + */ + private boolean checkPermission(final String permission) { + return (ContextCompat.checkSelfPermission(this, permission) + == PackageManager.PERMISSION_GRANTED); + } + + @Override + public void onRequestPermissionsResult(int requestCode, + @NonNull String permissions[], @NonNull int[] grantResults) { + if (requestCode == PERMISSION_REQUEST_CODE) { + for (int grant : grantResults) { + if (grant != PackageManager.PERMISSION_GRANTED) { + Log.i(TAG, "Permission denied, close app."); + finish(); + return; + } + } + return; + } + finish(); + } + + /** + * Prepare camera preview. + */ + private void preparePreview() { + copyFilesToExternalDir(); + path = getExternalFilesDir(null).getAbsolutePath(); + predictModel = new File(path+"/style_predict_quantized_256.tflite"); + transferModel = new File(path+"/style_transfer_quantized_384.tflite"); + + currentPipe = new Pipeline(getDesc()); + mCamera = Camera.open(); + + resetView(); + resetCamera(); + } + + private void copyFilesToExternalDir() + { + AssetManager am = getResources().getAssets(); + String[] files = null; + + try { + files = am.list("models/"); + } catch (Exception e) { + Log.e("TAG", "#### Failed to get asset file list"); + e.printStackTrace(); + return; + } + + // Copy files into app-specific directory. + for (String filename : files) { + try { + InputStream in = am.open("models/" + filename); + String outDir = getExternalFilesDir(null).getAbsolutePath(); + File outFile = new File(outDir, filename); + OutputStream out = new FileOutputStream(outFile); + + byte[] buffer = new byte[1024]; + int read; + while ((read = in.read(buffer)) != -1) { + out.write(buffer, 0, read); + } + + in.close(); + out.flush(); + out.close(); + } catch (IOException e) { + Log.e("TAG", "Failed to copy file: " + filename); + e.printStackTrace(); + return; + } + } + } + + private void resetView() { + prevCameraCallback = getNewCameraCallback(); + mCameraView.getHolder().addCallback(prevCameraCallback); + + prevScaledCallback = getNewScaledCallback(); + mStyledView.getHolder().addCallback(prevScaledCallback); + } + + private void resetCamera() + { + Camera.Parameters parameters = mCamera.getParameters(); + List focusModes = parameters.getSupportedFocusModes(); + if (focusModes.contains(Camera.Parameters.FOCUS_MODE_CONTINUOUS_PICTURE)){ + Log.d(TAG, "Set FOCUS_MODE_CONTINUOUS_PICTURE"); + parameters.setFocusMode(Camera.Parameters.FOCUS_MODE_CONTINUOUS_PICTURE); + } + + parameters.setPreviewSize(640, 480); + parameters.setPreviewFormat(ImageFormat.NV21); + parameters.setPreviewFrameRate(30); + + mCamera.setParameters(parameters); + mCamera.setDisplayOrientation(90); + } + + private SurfaceHolder.Callback getNewCameraCallback() + { + return new SurfaceHolder.Callback() { + @Override + public void surfaceCreated(SurfaceHolder holder) { + Log.d(TAG, "Preview surface created"); + } + + @Override + public void surfaceChanged(SurfaceHolder holder, int format, int width, int height) { + Log.d(TAG, "Preview surface changed"); + try { + mCamera.stopPreview(); + mCamera.setPreviewDisplay(holder); + mCamera.setPreviewCallback(getNewPreviewCallback()); + mCamera.startPreview(); + Log.d(TAG, "Preview resumed."); + } catch (Exception e) { + Log.e(TAG, "Error on starting camera preview: " + e.getMessage()); + e.printStackTrace(); + } + } + + @Override + public void surfaceDestroyed(SurfaceHolder holder) { + Log.d(TAG, "Preview surface destroyed"); + if (mCamera != null) { + mCamera.stopPreview(); + } + } + }; + } + + private SurfaceHolder.Callback getNewScaledCallback() + { + return new SurfaceHolder.Callback() { + @Override + public void surfaceCreated(SurfaceHolder holder) { + Log.d(TAG, "Styledview surface created"); + } + + @Override + public void surfaceChanged(SurfaceHolder holder, int format, int width, int height) { + Log.d(TAG, "Styledview surface changed"); + getCurrentPipe().setSurface("sinkstyled", holder.getSurface()); + } + + @Override + public void surfaceDestroyed(SurfaceHolder holder) { + Log.d(TAG, "Styledview surface destroyed"); + } + }; + } + + private Camera.PreviewCallback getNewPreviewCallback() + { + return new Camera.PreviewCallback() { + @Override + public void onPreviewFrame(byte[] data, Camera camera) { + updateFrame += 1; + styleFrame += 1; + if(updateFrame == 1) + { + TensorsInfo info = new TensorsInfo(); + info.addTensorInfo(NNStreamer.TensorType.UINT8, new int[]{3,640,480,1}); + TensorsData input = info.allocate(); + ByteBuffer buffer = input.getTensorData(0); + buffer.put(Arrays.copyOf(data, data.length)); + input.setTensorData(0, buffer); + getCurrentPipe().inputData("srcx", input); + + TensorsInfo info1 = new TensorsInfo(); + info1.addTensorInfo(NNStreamer.TensorType.UINT8, new int[]{3,256,256,1}); + TensorsData input1 = info1.allocate(); + ByteBuffer buffer1 = input1.getTensorData(0); + byte[] data1 = null; + try { + data1 = Files.readAllBytes(getCurrentStyleRawImage().toPath()); + } + catch (Exception e) + { + e.printStackTrace(); + } + buffer1.put(Arrays.copyOf(data1, data1.length)); + input1.setTensorData(0, buffer1); + getCurrentPipe().inputData("src1", input1); + + getCurrentPipe().stop(); + } + if(updateFrame > updateLimit) + { + currentPipe.start(); + updateFrame = 0; + } + if(styleFrame > 300) + { + styleNumber++; + Log.d(TAG, "#### update style to style "+styleNumber+"."); + styleFrame = 0; + updateFrame -= 10; + } + } + }; + } + + private Pipeline getCurrentPipe() + { + return currentPipe; + } + + private String getDesc() + { + String desc = "appsrc name=srcx ! " + + "video/x-raw,format=NV21,width=640,height=480,framerate=(fraction)0/1 ! " + + "videoconvert ! " + + "video/x-raw,format=RGB,width=640,height=480,framerate=(fraction)0/1 ! " + + "videoflip method=clockwise ! videocrop left=0 right=0 top=80 bottom=80 ! " + + "videoscale ! video/x-raw,width=384,height=384 ! tensor_converter ! " + + "other/tensor,dimension=(string)3:384:384:1,type=(string)uint8,framerate=(fraction)0/1 ! " + + "tensor_transform mode=arithmetic option=typecast:float32,add:0.0,div:255.0 ! mux.sink_0 "+ + "appsrc name=src1 ! " + + "other/tensor,dimension=(string)3:256:256:1,type=(string)uint8,framerate=(fraction)0/1 ! " + + "tensor_transform mode=arithmetic option=typecast:float32,add:0.0,div:255.0 ! " + + "tensor_filter framework=tensorflow-lite model=" + predictModel.getAbsolutePath() + " ! " + + "mux.sink_1 " + + "tensor_mux name=mux sync_mode=nosync ! tensor_filter framework=tensorflow-lite model=" + transferModel.getAbsolutePath() +" ! " + + "tensor_transform mode=arithmetic option=mul:255.0,add:0.0 ! " + + "tensor_transform mode=typecast option=uint8 ! " + + "tensor_decoder mode=direct_video ! " + + "videoconvert ! " + + "video/x-raw,format=RGB,width=384,height=384,framerate=(fraction)0/1 ! " + + "glimagesink name=sinkstyled"; + + return desc; + } + + private File getCurrentStyleRawImage() + { + String path = getExternalFilesDir(null).getAbsolutePath(); + return new File(path+"/style"+styleNumber+".raw"); + } +} diff --git a/android/example_app/style-transfer-with-nnstreamer-java-api/src/main/res/layout/activity_main.xml b/android/example_app/style-transfer-with-nnstreamer-java-api/src/main/res/layout/activity_main.xml index f86f2d10..4786cfe6 100644 --- a/android/example_app/style-transfer-with-nnstreamer-java-api/src/main/res/layout/activity_main.xml +++ b/android/example_app/style-transfer-with-nnstreamer-java-api/src/main/res/layout/activity_main.xml @@ -6,25 +6,38 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" - android:weightSum="3" tools:context=".MainActivity"> - + + - + + +