We wanted to deploy the mnist-cnn model, which can recognize numbers from 0 to 9, to the raspberry pi camera using it as a custom model.
The model consists only of a simple structure for learning using mnist datasets.
With reference to the guide, we have succeeded in quantizing the model in the form of .keras.
However, the following error occurs during the model conversion process.
An error occurs that the .bat file does not exist and does not proceed any further.
1. What's wrong with this?
I'd like to know how I can deploy a simple mnist model so that the ai camera recognizes the numbers automatically.
2. Should the model be configured more complexly for this purpose? Or is there any more code you need to use the AI camera?
The error is as follows.
PS C:\Users\wnsgu\OneDrive\Desktop\vscode> imxconv-tf -i qmodel_mnist_cnn.keras -o imx500_output --no-input-persistency
2024-11-25 17:57:55.452925: I tensorflow/core/util/port.cc:113] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable `TF_ENABLE_ONEDNN_OPTS=0`.
WARNING:tensorflow:From C:\Users\wnsgu\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\keras\src\losses.py
The name tf.losses.sparse_softmax_cross_entropy is deprecated. Please use tf.compat.v1.losses.sparse_softmax_cross_entropy instead.
2024-11-25 17:58:18,990 INFO : Running version 1.10.0 [C:\Users\wnsgu\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\uni\common\logger.py:148]
2024-11-25 17:58:18,990 INFO : Converting qmodel_mnist_cnn.keras [C:\Users\wnsgu\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\uni\common\logger.py:148]
WARNING:tensorflow:From C:\Users\wnsgu\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\keras\src\backend.py
The name tf.executing_eagerly_outside_functions is deprecated. Please use tf.compat.v1.executing_eagerly_outside_functions instead.
2024-11-25 17:58:19,292 WARNING : From C:\Users\wnsgu\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\keras\src\backend.py
The name tf.executing_eagerly_outside_functions is deprecated. Please use tf.compat.v1.executing_eagerly_outside_functions instead.
[C:\Users\wnsgu\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\tensorflow\python\util\module_wrapper.py:149]
2024-11-25 17:58:19.314210: I tensorflow/core/platform/cpu_feature_guard.cc:182] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.
To enable the following instructions: SSE SSE2 SSE3 SSE4.1 SSE4.2 AVX2 FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
WARNING:tensorflow:From C:\Users\wnsgu\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\keras\src\layers\pooling\max_pooling2d.py:161: The name tf.nn.max_pool is deprecated. Please use tf.nn.max_pool2d instead.
2024-11-25 17:58:19,509 WARNING : From C:\Users\wnsgu\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\keras\src\layers\pooling\max_pooling2d.py:161: The name tf.nn.max_pool is deprecated. Please use tf.nn.max_pool2d instead.
[C:\Users\wnsgu\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\tensorflow\python\util\module_wrapper.py:149]
2024-11-25 17:58:20,328 INFO : Wrote outputs to C:\Users\wnsgu\AppData\Local\Temp\tmplm2lrizv/qmodel_mnist_cnn.uni-tensorflow.um.pb [C:\Users\wnsgu\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\uni\common\logger.py:148]
2024-11-25 17:58:20,328 INFO : Converted successfully [C:\Users\wnsgu\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\uni\common\logger.py:148]
25.-11.-2024. 월:17 WARNING: Script 'converter-frontend.bat' does not exist in C:\Users\wnsgu\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\sdspconv_wrapper\sdspconv-dist.
25.-11.-2024. 월:17 WARNING: Script 'tiling-advisor.bat' does not exist in C:\Users\wnsgu\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\sdspconv_wrapper\sdspconv-dist.
25.-11.-2024. 월:17 WARNING: Script 'converter-fm2lm.bat' does not exist in C:\Users\wnsgu\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\sdspconv_wrapper\sdspconv-dist.
25.-11.-2024. 월:17 WARNING: Script 'converter-backend.bat' does not exist in C:\Users\wnsgu\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\sdspconv_wrapper\sdspconv-dist.
25.-11.-2024. 월:17 WARNING: Script 'converter-packer.bat' does not exist in C:\Users\wnsgu\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\sdspconv_wrapper\sdspconv-dist.
25.-11.-2024. 월:17 WARNING: Script 'converter-main.bat' does not exist in C:\Users\wnsgu\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\sdspconv_wrapper\sdspconv-dist.
2024-11-25 17:58:21,717 INFO : CODE: [START] Starting SDSPconv
The model consists only of a simple structure for learning using mnist datasets.
With reference to the guide, we have succeeded in quantizing the model in the form of .keras.
However, the following error occurs during the model conversion process.
An error occurs that the .bat file does not exist and does not proceed any further.
1. What's wrong with this?
I'd like to know how I can deploy a simple mnist model so that the ai camera recognizes the numbers automatically.
2. Should the model be configured more complexly for this purpose? Or is there any more code you need to use the AI camera?
The error is as follows.
PS C:\Users\wnsgu\OneDrive\Desktop\vscode> imxconv-tf -i qmodel_mnist_cnn.keras -o imx500_output --no-input-persistency
2024-11-25 17:57:55.452925: I tensorflow/core/util/port.cc:113] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable `TF_ENABLE_ONEDNN_OPTS=0`.
WARNING:tensorflow:From C:\Users\wnsgu\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\keras\src\losses.py
2024-11-25 17:58:18,990 INFO : Running version 1.10.0 [C:\Users\wnsgu\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\uni\common\logger.py:148]
2024-11-25 17:58:18,990 INFO : Converting qmodel_mnist_cnn.keras [C:\Users\wnsgu\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\uni\common\logger.py:148]
WARNING:tensorflow:From C:\Users\wnsgu\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\keras\src\backend.py
2024-11-25 17:58:19,292 WARNING : From C:\Users\wnsgu\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\keras\src\backend.py
[C:\Users\wnsgu\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\tensorflow\python\util\module_wrapper.py:149]
2024-11-25 17:58:19.314210: I tensorflow/core/platform/cpu_feature_guard.cc:182] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.
To enable the following instructions: SSE SSE2 SSE3 SSE4.1 SSE4.2 AVX2 FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
WARNING:tensorflow:From C:\Users\wnsgu\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\keras\src\layers\pooling\max_pooling2d.py:161: The name tf.nn.max_pool is deprecated. Please use tf.nn.max_pool2d instead.
2024-11-25 17:58:19,509 WARNING : From C:\Users\wnsgu\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\keras\src\layers\pooling\max_pooling2d.py:161: The name tf.nn.max_pool is deprecated. Please use tf.nn.max_pool2d instead.
[C:\Users\wnsgu\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\tensorflow\python\util\module_wrapper.py:149]
2024-11-25 17:58:20,328 INFO : Wrote outputs to C:\Users\wnsgu\AppData\Local\Temp\tmplm2lrizv/qmodel_mnist_cnn.uni-tensorflow.um.pb [C:\Users\wnsgu\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\uni\common\logger.py:148]
2024-11-25 17:58:20,328 INFO : Converted successfully [C:\Users\wnsgu\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\uni\common\logger.py:148]
25.-11.-2024. 월:17 WARNING: Script 'converter-frontend.bat' does not exist in C:\Users\wnsgu\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\sdspconv_wrapper\sdspconv-dist.
25.-11.-2024. 월:17 WARNING: Script 'tiling-advisor.bat' does not exist in C:\Users\wnsgu\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\sdspconv_wrapper\sdspconv-dist.
25.-11.-2024. 월:17 WARNING: Script 'converter-fm2lm.bat' does not exist in C:\Users\wnsgu\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\sdspconv_wrapper\sdspconv-dist.
25.-11.-2024. 월:17 WARNING: Script 'converter-backend.bat' does not exist in C:\Users\wnsgu\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\sdspconv_wrapper\sdspconv-dist.
25.-11.-2024. 월:17 WARNING: Script 'converter-packer.bat' does not exist in C:\Users\wnsgu\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\sdspconv_wrapper\sdspconv-dist.
25.-11.-2024. 월:17 WARNING: Script 'converter-main.bat' does not exist in C:\Users\wnsgu\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\sdspconv_wrapper\sdspconv-dist.
2024-11-25 17:58:21,717 INFO : CODE: [START] Starting SDSPconv
Statistics: Posted by junhyeok — Mon Nov 25, 2024 9:26 am