Cainvas
Model Files
shape_model.h5
keras
Model
deepSea Compiled Models
shape_model.exe
deepSea
Ubuntu

Shape Detection

Credit: AITS Cainvas Community

Photo by Aleksei Vasileika on Dribbble

In [1]:
!wget https://cainvas-static.s3.amazonaws.com/media/user_data/cainvas-admin/mobilenet_v1.zip -O mobilenet_v1.zip
--2021-06-28 05:29:49--  https://cainvas-static.s3.amazonaws.com/media/user_data/cainvas-admin/mobilenet_v1.zip
Resolving cainvas-static.s3.amazonaws.com (cainvas-static.s3.amazonaws.com)... 52.219.160.35
Connecting to cainvas-static.s3.amazonaws.com (cainvas-static.s3.amazonaws.com)|52.219.160.35|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 9263 (9.0K) [application/zip]
Saving to: ‘mobilenet_v1.zip’

mobilenet_v1.zip    100%[===================>]   9.05K  --.-KB/s    in 0s      

2021-06-28 05:29:49 (148 MB/s) - ‘mobilenet_v1.zip’ saved [9263/9263]

In [2]:
import zipfile as zf
files = zf.ZipFile("mobilenet_v1.zip", 'r')
files.extractall('mobilenet_v1')
files.close()
In [3]:
from tensorflow import keras
import numpy as np
from tensorflow.keras import backend as K
from tensorflow.keras.optimizers import Adam
from tensorflow.keras.metrics import categorical_crossentropy
from tensorflow.keras.preprocessing.image import ImageDataGenerator
from tensorflow.keras.preprocessing import image
from tensorflow.keras.models import Model
from tensorflow.keras.applications import imagenet_utils
from tensorflow.keras.layers import Dense, GlobalAveragePooling2D, Dropout,Flatten
import matplotlib.pyplot as plt
import cv2

from mobilenet_v1.mobilenet import MobileNet

from tensorflow.keras.applications.mobilenet import preprocess_input
In [4]:
# the parameters
IMAGE_SIZE = 224
ALPHA=0.75
EPOCHS=20
In [5]:
def prepare_image(file):
    img_path = ''
    img = image.load_img(img_path + file, target_size=(IMAGE_SIZE, IMAGE_SIZE))
    img_array = image.img_to_array(img)
    img_array_expanded_dims = np.expand_dims(img_array, axis=0)
    return keras.applications.mobilenet.preprocess_input(img_array_expanded_dims)
In [6]:
# function to define dropout, hidden layers and the number of output
def build_finetune_model(base_model, dropout, fc_layers, num_classes):
    for layer in base_model.layers:
        layer.trainable = False

    x = base_model.output
    x = GlobalAveragePooling2D()(x)
    
    for fc in fc_layers:
        # New FC layer, random init
        x = Dense(fc, activation='relu')(x) 
        x = Dropout(dropout)(x)

    # New softmax layer
    predictions = Dense(num_classes, activation='softmax')(x) 
    
    finetune_model = Model(inputs=base_model.input, outputs=predictions)

    return finetune_model
In [7]:
# Using MobileNetv1
base_model=MobileNet(input_shape=(IMAGE_SIZE, IMAGE_SIZE,3), alpha = ALPHA, 
                     depth_multiplier = 1, dropout = 0.001, include_top = False, 
                     weights = "imagenet", classes = 4, backend=keras.backend,
                     layers=keras.layers,models=keras.models,utils=keras.utils)
Downloading data from https://github.com/fchollet/deep-learning-models/releases/download/v0.6/mobilenet_7_5_224_tf_no_top.h5
10633216/10626956 [==============================] - 3s 0us/step
In [8]:
!wget https://cainvas-static.s3.amazonaws.com/media/user_data/cainvas-admin/3D_Shapes.zip -O 3D_Shapes.zip
--2021-06-28 05:29:56--  https://cainvas-static.s3.amazonaws.com/media/user_data/cainvas-admin/3D_Shapes.zip
Resolving cainvas-static.s3.amazonaws.com (cainvas-static.s3.amazonaws.com)... 52.219.62.96
Connecting to cainvas-static.s3.amazonaws.com (cainvas-static.s3.amazonaws.com)|52.219.62.96|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2137601 (2.0M) [application/zip]
Saving to: ‘3D_Shapes.zip’

3D_Shapes.zip       100%[===================>]   2.04M  --.-KB/s    in 0.01s   

2021-06-28 05:29:56 (188 MB/s) - ‘3D_Shapes.zip’ saved [2137601/2137601]

In [9]:
import zipfile as zf
files = zf.ZipFile("3D_Shapes.zip", 'r')
files.extractall('3D_Shapes_Dataset')
files.close()
In [10]:
FC_LAYERS = [100, 50]
dropout = 0.5

finetune_model = build_finetune_model(base_model, 
                                      dropout=dropout, 
                                      fc_layers=FC_LAYERS, 
                                      num_classes=4)
In [11]:
train_datagen=ImageDataGenerator(preprocessing_function=preprocess_input)

train_generator=train_datagen.flow_from_directory('3D_Shapes_Dataset',
                                                 target_size=(IMAGE_SIZE,IMAGE_SIZE),
                                                 color_mode='rgb',
                                                 batch_size=32,
                                                 class_mode='categorical', shuffle=True)
Found 1182 images belonging to 4 classes.
In [12]:
finetune_model.summary()
finetune_model.compile(optimizer='Adam',loss='categorical_crossentropy',metrics=['accuracy'])
step_size_train=train_generator.n//train_generator.batch_size
history = finetune_model.fit_generator(generator=train_generator,steps_per_epoch=step_size_train,epochs=EPOCHS, shuffle=True)

finetune_model.save('shape_model.h5')
Model: "functional_1"
_________________________________________________________________
Layer (type)                 Output Shape              Param #   
=================================================================
input_1 (InputLayer)         [(None, 224, 224, 3)]     0         
_________________________________________________________________
conv1_pad (ZeroPadding2D)    (None, 226, 226, 3)       0         
_________________________________________________________________
conv1 (Conv2D)               (None, 112, 112, 24)      648       
_________________________________________________________________
conv1_bn (BatchNormalization (None, 112, 112, 24)      96        
_________________________________________________________________
conv1_relu (ReLU)            (None, 112, 112, 24)      0         
_________________________________________________________________
conv_dw_1 (DepthwiseConv2D)  (None, 112, 112, 24)      216       
_________________________________________________________________
conv_dw_1_bn (BatchNormaliza (None, 112, 112, 24)      96        
_________________________________________________________________
conv_dw_1_relu (ReLU)        (None, 112, 112, 24)      0         
_________________________________________________________________
conv_pw_1 (Conv2D)           (None, 112, 112, 48)      1152      
_________________________________________________________________
conv_pw_1_bn (BatchNormaliza (None, 112, 112, 48)      192       
_________________________________________________________________
conv_pw_1_relu (ReLU)        (None, 112, 112, 48)      0         
_________________________________________________________________
conv_pad_2 (ZeroPadding2D)   (None, 114, 114, 48)      0         
_________________________________________________________________
conv_dw_2 (DepthwiseConv2D)  (None, 56, 56, 48)        432       
_________________________________________________________________
conv_dw_2_bn (BatchNormaliza (None, 56, 56, 48)        192       
_________________________________________________________________
conv_dw_2_relu (ReLU)        (None, 56, 56, 48)        0         
_________________________________________________________________
conv_pw_2 (Conv2D)           (None, 56, 56, 96)        4608      
_________________________________________________________________
conv_pw_2_bn (BatchNormaliza (None, 56, 56, 96)        384       
_________________________________________________________________
conv_pw_2_relu (ReLU)        (None, 56, 56, 96)        0         
_________________________________________________________________
conv_dw_3 (DepthwiseConv2D)  (None, 56, 56, 96)        864       
_________________________________________________________________
conv_dw_3_bn (BatchNormaliza (None, 56, 56, 96)        384       
_________________________________________________________________
conv_dw_3_relu (ReLU)        (None, 56, 56, 96)        0         
_________________________________________________________________
conv_pw_3 (Conv2D)           (None, 56, 56, 96)        9216      
_________________________________________________________________
conv_pw_3_bn (BatchNormaliza (None, 56, 56, 96)        384       
_________________________________________________________________
conv_pw_3_relu (ReLU)        (None, 56, 56, 96)        0         
_________________________________________________________________
conv_pad_4 (ZeroPadding2D)   (None, 58, 58, 96)        0         
_________________________________________________________________
conv_dw_4 (DepthwiseConv2D)  (None, 28, 28, 96)        864       
_________________________________________________________________
conv_dw_4_bn (BatchNormaliza (None, 28, 28, 96)        384       
_________________________________________________________________
conv_dw_4_relu (ReLU)        (None, 28, 28, 96)        0         
_________________________________________________________________
conv_pw_4 (Conv2D)           (None, 28, 28, 192)       18432     
_________________________________________________________________
conv_pw_4_bn (BatchNormaliza (None, 28, 28, 192)       768       
_________________________________________________________________
conv_pw_4_relu (ReLU)        (None, 28, 28, 192)       0         
_________________________________________________________________
conv_dw_5 (DepthwiseConv2D)  (None, 28, 28, 192)       1728      
_________________________________________________________________
conv_dw_5_bn (BatchNormaliza (None, 28, 28, 192)       768       
_________________________________________________________________
conv_dw_5_relu (ReLU)        (None, 28, 28, 192)       0         
_________________________________________________________________
conv_pw_5 (Conv2D)           (None, 28, 28, 192)       36864     
_________________________________________________________________
conv_pw_5_bn (BatchNormaliza (None, 28, 28, 192)       768       
_________________________________________________________________
conv_pw_5_relu (ReLU)        (None, 28, 28, 192)       0         
_________________________________________________________________
conv_pad_6 (ZeroPadding2D)   (None, 30, 30, 192)       0         
_________________________________________________________________
conv_dw_6 (DepthwiseConv2D)  (None, 14, 14, 192)       1728      
_________________________________________________________________
conv_dw_6_bn (BatchNormaliza (None, 14, 14, 192)       768       
_________________________________________________________________
conv_dw_6_relu (ReLU)        (None, 14, 14, 192)       0         
_________________________________________________________________
conv_pw_6 (Conv2D)           (None, 14, 14, 384)       73728     
_________________________________________________________________
conv_pw_6_bn (BatchNormaliza (None, 14, 14, 384)       1536      
_________________________________________________________________
conv_pw_6_relu (ReLU)        (None, 14, 14, 384)       0         
_________________________________________________________________
conv_dw_7 (DepthwiseConv2D)  (None, 14, 14, 384)       3456      
_________________________________________________________________
conv_dw_7_bn (BatchNormaliza (None, 14, 14, 384)       1536      
_________________________________________________________________
conv_dw_7_relu (ReLU)        (None, 14, 14, 384)       0         
_________________________________________________________________
conv_pw_7 (Conv2D)           (None, 14, 14, 384)       147456    
_________________________________________________________________
conv_pw_7_bn (BatchNormaliza (None, 14, 14, 384)       1536      
_________________________________________________________________
conv_pw_7_relu (ReLU)        (None, 14, 14, 384)       0         
_________________________________________________________________
conv_dw_8 (DepthwiseConv2D)  (None, 14, 14, 384)       3456      
_________________________________________________________________
conv_dw_8_bn (BatchNormaliza (None, 14, 14, 384)       1536      
_________________________________________________________________
conv_dw_8_relu (ReLU)        (None, 14, 14, 384)       0         
_________________________________________________________________
conv_pw_8 (Conv2D)           (None, 14, 14, 384)       147456    
_________________________________________________________________
conv_pw_8_bn (BatchNormaliza (None, 14, 14, 384)       1536      
_________________________________________________________________
conv_pw_8_relu (ReLU)        (None, 14, 14, 384)       0         
_________________________________________________________________
conv_dw_9 (DepthwiseConv2D)  (None, 14, 14, 384)       3456      
_________________________________________________________________
conv_dw_9_bn (BatchNormaliza (None, 14, 14, 384)       1536      
_________________________________________________________________
conv_dw_9_relu (ReLU)        (None, 14, 14, 384)       0         
_________________________________________________________________
conv_pw_9 (Conv2D)           (None, 14, 14, 384)       147456    
_________________________________________________________________
conv_pw_9_bn (BatchNormaliza (None, 14, 14, 384)       1536      
_________________________________________________________________
conv_pw_9_relu (ReLU)        (None, 14, 14, 384)       0         
_________________________________________________________________
conv_dw_10 (DepthwiseConv2D) (None, 14, 14, 384)       3456      
_________________________________________________________________
conv_dw_10_bn (BatchNormaliz (None, 14, 14, 384)       1536      
_________________________________________________________________
conv_dw_10_relu (ReLU)       (None, 14, 14, 384)       0         
_________________________________________________________________
conv_pw_10 (Conv2D)          (None, 14, 14, 384)       147456    
_________________________________________________________________
conv_pw_10_bn (BatchNormaliz (None, 14, 14, 384)       1536      
_________________________________________________________________
conv_pw_10_relu (ReLU)       (None, 14, 14, 384)       0         
_________________________________________________________________
conv_dw_11 (DepthwiseConv2D) (None, 14, 14, 384)       3456      
_________________________________________________________________
conv_dw_11_bn (BatchNormaliz (None, 14, 14, 384)       1536      
_________________________________________________________________
conv_dw_11_relu (ReLU)       (None, 14, 14, 384)       0         
_________________________________________________________________
conv_pw_11 (Conv2D)          (None, 14, 14, 384)       147456    
_________________________________________________________________
conv_pw_11_bn (BatchNormaliz (None, 14, 14, 384)       1536      
_________________________________________________________________
conv_pw_11_relu (ReLU)       (None, 14, 14, 384)       0         
_________________________________________________________________
conv_pad_12 (ZeroPadding2D)  (None, 16, 16, 384)       0         
_________________________________________________________________
conv_dw_12 (DepthwiseConv2D) (None, 7, 7, 384)         3456      
_________________________________________________________________
conv_dw_12_bn (BatchNormaliz (None, 7, 7, 384)         1536      
_________________________________________________________________
conv_dw_12_relu (ReLU)       (None, 7, 7, 384)         0         
_________________________________________________________________
conv_pw_12 (Conv2D)          (None, 7, 7, 768)         294912    
_________________________________________________________________
conv_pw_12_bn (BatchNormaliz (None, 7, 7, 768)         3072      
_________________________________________________________________
conv_pw_12_relu (ReLU)       (None, 7, 7, 768)         0         
_________________________________________________________________
conv_dw_13 (DepthwiseConv2D) (None, 7, 7, 768)         6912      
_________________________________________________________________
conv_dw_13_bn (BatchNormaliz (None, 7, 7, 768)         3072      
_________________________________________________________________
conv_dw_13_relu (ReLU)       (None, 7, 7, 768)         0         
_________________________________________________________________
conv_pw_13 (Conv2D)          (None, 7, 7, 768)         589824    
_________________________________________________________________
conv_pw_13_bn (BatchNormaliz (None, 7, 7, 768)         3072      
_________________________________________________________________
conv_pw_13_relu (ReLU)       (None, 7, 7, 768)         0         
_________________________________________________________________
global_average_pooling2d (Gl (None, 768)               0         
_________________________________________________________________
dense (Dense)                (None, 100)               76900     
_________________________________________________________________
dropout (Dropout)            (None, 100)               0         
_________________________________________________________________
dense_1 (Dense)              (None, 50)                5050      
_________________________________________________________________
dropout_1 (Dropout)          (None, 50)                0         
_________________________________________________________________
dense_2 (Dense)              (None, 4)                 204       
=================================================================
Total params: 1,915,130
Trainable params: 82,154
Non-trainable params: 1,832,976
_________________________________________________________________
WARNING:tensorflow:From <ipython-input-12-ad3e89ccc49c>:4: Model.fit_generator (from tensorflow.python.keras.engine.training) is deprecated and will be removed in a future version.
Instructions for updating:
Please use Model.fit, which supports generators.
Epoch 1/20
36/36 [==============================] - 1s 39ms/step - loss: 1.1525 - accuracy: 0.5313
Epoch 2/20
36/36 [==============================] - 1s 31ms/step - loss: 0.4755 - accuracy: 0.8191
Epoch 3/20
36/36 [==============================] - 1s 30ms/step - loss: 0.2688 - accuracy: 0.9052
Epoch 4/20
36/36 [==============================] - 1s 31ms/step - loss: 0.1548 - accuracy: 0.9496
Epoch 5/20
36/36 [==============================] - 1s 30ms/step - loss: 0.1056 - accuracy: 0.9661
Epoch 6/20
36/36 [==============================] - 1s 31ms/step - loss: 0.0807 - accuracy: 0.9800
Epoch 7/20
36/36 [==============================] - 1s 31ms/step - loss: 0.0719 - accuracy: 0.9757
Epoch 8/20
36/36 [==============================] - 1s 31ms/step - loss: 0.0606 - accuracy: 0.9870
Epoch 9/20
36/36 [==============================] - 1s 31ms/step - loss: 0.0454 - accuracy: 0.9843
Epoch 10/20
36/36 [==============================] - 1s 30ms/step - loss: 0.0407 - accuracy: 0.9878
Epoch 11/20
36/36 [==============================] - 1s 31ms/step - loss: 0.0358 - accuracy: 0.9878
Epoch 12/20
36/36 [==============================] - 1s 31ms/step - loss: 0.0299 - accuracy: 0.9913
Epoch 13/20
36/36 [==============================] - 1s 31ms/step - loss: 0.0306 - accuracy: 0.9930
Epoch 14/20
36/36 [==============================] - 1s 30ms/step - loss: 0.0265 - accuracy: 0.9939
Epoch 15/20
36/36 [==============================] - 1s 31ms/step - loss: 0.0212 - accuracy: 0.9939
Epoch 16/20
36/36 [==============================] - 1s 31ms/step - loss: 0.0191 - accuracy: 0.9948
Epoch 17/20
36/36 [==============================] - 1s 30ms/step - loss: 0.0202 - accuracy: 0.9939
Epoch 18/20
36/36 [==============================] - 1s 30ms/step - loss: 0.0259 - accuracy: 0.9904
Epoch 19/20
36/36 [==============================] - 1s 30ms/step - loss: 0.0149 - accuracy: 0.9957
Epoch 20/20
36/36 [==============================] - 1s 31ms/step - loss: 0.0173 - accuracy: 0.9957
In [15]:
plt.plot(history.history['loss'])
plt.plot(history.history['accuracy'])
plt.title('model loss')
plt.ylabel('loss')
plt.xlabel('epoch')
plt.legend(['loss', 'accuracy'], loc='upper left')
plt.show()
In [16]:
def predict_shape(img_path):
#img_path="3D_Shapes_Dataset/cube/00000963.jpg"
    preprocessed_image = prepare_image(img_path)
    predictions_shape = finetune_model.predict(preprocessed_image) 
    labels=['Cube','Cylinder','Spheroid','Sphere']
    #print("Input Image :")
    img=cv2.cvtColor(cv2.imread(img_path), cv2.COLOR_BGR2RGB)
    plt.imshow(img)
    print("Shape Detected: ", labels[predictions_shape[0].tolist().index(max(predictions_shape[0]))])
In [17]:
img_path="3D_Shapes_Dataset/cube/00000963.jpg"
predict_shape(img_path)
Shape Detected:  Cube
In [20]:
!wget https://cainvas-static.s3.amazonaws.com/media/user_data/cainvas-admin/sample2.jpg -O sample2.jpg
--2021-06-28 05:32:02--  https://cainvas-static.s3.amazonaws.com/media/user_data/cainvas-admin/sample2.jpg
Resolving cainvas-static.s3.amazonaws.com (cainvas-static.s3.amazonaws.com)... 52.219.160.51
Connecting to cainvas-static.s3.amazonaws.com (cainvas-static.s3.amazonaws.com)|52.219.160.51|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 4902153 (4.7M) [image/jpeg]
Saving to: ‘sample2.jpg’

sample2.jpg         100%[===================>]   4.67M  --.-KB/s    in 0.03s   

2021-06-28 05:32:02 (182 MB/s) - ‘sample2.jpg’ saved [4902153/4902153]

In [21]:
# Real-Life example 2
img_path="sample2.jpg"
predict_shape(img_path)
Shape Detected:  Spheroid
In [22]:
!wget https://cainvas-static.s3.amazonaws.com/media/user_data/cainvas-admin/sample3.jpg -O sample3.jpg
--2021-06-28 05:32:07--  https://cainvas-static.s3.amazonaws.com/media/user_data/cainvas-admin/sample3.jpg
Resolving cainvas-static.s3.amazonaws.com (cainvas-static.s3.amazonaws.com)... 52.219.156.15
Connecting to cainvas-static.s3.amazonaws.com (cainvas-static.s3.amazonaws.com)|52.219.156.15|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 25853 (25K) [image/jpeg]
Saving to: ‘sample3.jpg’

sample3.jpg         100%[===================>]  25.25K  --.-KB/s    in 0.001s  

2021-06-28 05:32:07 (40.3 MB/s) - ‘sample3.jpg’ saved [25853/25853]

In [23]:
# Real-Life example 3
img_path="sample3.jpg"
predict_shape(img_path)
Shape Detected:  Sphere
In [24]:
!wget https://cainvas-static.s3.amazonaws.com/media/user_data/cainvas-admin/sample4.jpg -O sample4.jpg
--2021-06-28 05:32:09--  https://cainvas-static.s3.amazonaws.com/media/user_data/cainvas-admin/sample4.jpg
Resolving cainvas-static.s3.amazonaws.com (cainvas-static.s3.amazonaws.com)... 52.219.156.15
Connecting to cainvas-static.s3.amazonaws.com (cainvas-static.s3.amazonaws.com)|52.219.156.15|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 12481 (12K) [image/jpeg]
Saving to: ‘sample4.jpg’

sample4.jpg         100%[===================>]  12.19K  --.-KB/s    in 0s      

2021-06-28 05:32:09 (203 MB/s) - ‘sample4.jpg’ saved [12481/12481]

In [25]:
# Real-Life example 4
img_path="sample4.jpg"
predict_shape(img_path)
Shape Detected:  Cylinder

deepC

In [26]:
!deepCC shape_model.h5
[INFO]
Reading [keras model] 'shape_model.h5'
[SUCCESS]
Saved 'shape_model_deepC/shape_model.onnx'
[INFO]
Reading [onnx model] 'shape_model_deepC/shape_model.onnx'
[INFO]
Model info:
  ir_vesion : 5
  doc       : 
[WARNING]
[ONNX]: graph-node conv1's attribute auto_pad has no meaningful data.
[WARNING]
[ONNX]: graph-node conv_dw_1's attribute auto_pad has no meaningful data.
[WARNING]
[ONNX]: graph-node conv_pw_1's attribute auto_pad has no meaningful data.
[WARNING]
[ONNX]: graph-node conv_dw_2's attribute auto_pad has no meaningful data.
[WARNING]
[ONNX]: graph-node conv_pw_2's attribute auto_pad has no meaningful data.
[WARNING]
[ONNX]: graph-node conv_dw_3's attribute auto_pad has no meaningful data.
[WARNING]
[ONNX]: graph-node conv_pw_3's attribute auto_pad has no meaningful data.
[WARNING]
[ONNX]: graph-node conv_dw_4's attribute auto_pad has no meaningful data.
[WARNING]
[ONNX]: graph-node conv_pw_4's attribute auto_pad has no meaningful data.
[WARNING]
[ONNX]: graph-node conv_dw_5's attribute auto_pad has no meaningful data.
[WARNING]
[ONNX]: graph-node conv_pw_5's attribute auto_pad has no meaningful data.
[WARNING]
[ONNX]: graph-node conv_dw_6's attribute auto_pad has no meaningful data.
[WARNING]
[ONNX]: graph-node conv_pw_6's attribute auto_pad has no meaningful data.
[WARNING]
[ONNX]: graph-node conv_dw_7's attribute auto_pad has no meaningful data.
[WARNING]
[ONNX]: graph-node conv_pw_7's attribute auto_pad has no meaningful data.
[WARNING]
[ONNX]: graph-node conv_dw_8's attribute auto_pad has no meaningful data.
[WARNING]
[ONNX]: graph-node conv_pw_8's attribute auto_pad has no meaningful data.
[WARNING]
[ONNX]: graph-node conv_dw_9's attribute auto_pad has no meaningful data.
[WARNING]
[ONNX]: graph-node conv_pw_9's attribute auto_pad has no meaningful data.
[WARNING]
[ONNX]: graph-node conv_dw_10's attribute auto_pad has no meaningful data.
[WARNING]
[ONNX]: graph-node conv_pw_10's attribute auto_pad has no meaningful data.
[WARNING]
[ONNX]: graph-node conv_dw_11's attribute auto_pad has no meaningful data.
[WARNING]
[ONNX]: graph-node conv_pw_11's attribute auto_pad has no meaningful data.
[WARNING]
[ONNX]: graph-node conv_dw_12's attribute auto_pad has no meaningful data.
[WARNING]
[ONNX]: graph-node conv_pw_12's attribute auto_pad has no meaningful data.
[WARNING]
[ONNX]: graph-node conv_dw_13's attribute auto_pad has no meaningful data.
[WARNING]
[ONNX]: graph-node conv_pw_13's attribute auto_pad has no meaningful data.
[WARNING]
[ONNX]: terminal (input/output) input_1's shape is less than 1. Changing it to 1.
[WARNING]
[ONNX]: terminal (input/output) dense_2's shape is less than 1. Changing it to 1.
WARN (GRAPH): found operator node with the same name (dense_2) as io node.
[INFO]
Running DNNC graph sanity check ...
[SUCCESS]
Passed sanity check.
[INFO]
Writing C++ file 'shape_model_deepC/shape_model.cpp'
[INFO]
deepSea model files are ready in 'shape_model_deepC/' 
[RUNNING COMMAND]
g++ -std=c++11 -O3 -fno-rtti -fno-exceptions -I. -I/opt/tljh/user/lib/python3.7/site-packages/deepC-0.13-py3.7-linux-x86_64.egg/deepC/include -isystem /opt/tljh/user/lib/python3.7/site-packages/deepC-0.13-py3.7-linux-x86_64.egg/deepC/packages/eigen-eigen-323c052e1731 "shape_model_deepC/shape_model.cpp" -D_AITS_MAIN -o "shape_model_deepC/shape_model.exe"
[RUNNING COMMAND]
size "shape_model_deepC/shape_model.exe"
   text	   data	    bss	    dec	    hex	filename
7827629	   4360	    760	7832749	 7784ad	shape_model_deepC/shape_model.exe
[SUCCESS]
Saved model as executable "shape_model_deepC/shape_model.exe"