onnx2ncnn model conversion for raspberry pi - onnx

how to convert onnx model to ncnn i am using raspberry pi 5 and have to build ncnn in it but when I run the command on it not working
I have tried the command on onnx2ncnn but it says no module found

Related

How to run Caffe2 on Macbook Pro M1 GPU

I was able to run PyTorch with Macbook Pro M1 Max GPU. However Caffe2 does not use the GPUs.
import torch
torch.device("mps")
from caffe2.python import core
WARNING:root:This caffe2 python run failed to load cuda module:No module named 'caffe2.python.caffe2_pybind11_state_gpu',and AMD hip module:No module named 'caffe2.python.caffe2_pybind11_state_hip'.Will run in CPU only mode.
I created the PyTorch and Caffe2 from the nightly code using
export CMAKE_PREFIX_PATH=${CONDA_PREFIX:-"$(dirname $(which conda))/../"}
BUILD_CAFFE2=1 MACOSX_DEPLOYMENT_TARGET=10.9 CC=clang CXX=clang++ python setup.py install
Any suggestions on how to solve this?

Import Error when running paho mqtt as root (sudo python3 filename.py)

I'm about to set up a Raspberry Pi 3+ Model A as a client for openHAB2. Here I have a sensor on the Pi and WS2812b (alias Neopixel) connected.
Now I wrote (my first script) in Python to publish the sensor data (Bosch BMP280) via paho mqtt to the broker. This works as desired when I start the Python file with "python3 filename.py" ...
If I want to start the same file with "sudo python3 filename.py" the following error message appears:
Traceback (most recent call last):
File "mqtt_client.py", line 15, in <module>
import paho.mqtt.client as mqtt
ModuleNotFoundError: No module named 'paho'
However, I would like to extend the script to use the WS2812b. To control the WS2812b, the script must be started with root privileges. So I do not understand why paho-mqtt is no longer known when running "sudo" ...
Does anyone have a solution for this? Many thanks!
When you are running your script using sudo python3 filename.py it is using a python environment different from the one you used to install Paho.
In order to fix this you can either:
Add Defaults env_keep += "PYTHONPATH" to your /etc/sudoers
Run your script using sudo /path/to/python pythonscript.py

Speech Recognition. Module installed but won't work

Trying to get the speech recognition module to work. I have it working on my Windows 10 laptop, my Raspberry pi3 but I can't seem to get it to work on Ubuntu! The module has been install but neither PyCharm or Thonny can find it.
I've searched through stack overflow for a solution and haven't been successful. I've tried uninstalling and reinstalling the module. I've tried various versions of installing the module such as using the setuup.py file or pip, tried moving the folders/files where they should be etc..
(Also tried telling the Computer he's a good boy but that didn't work either...)
I can use this line of code
python3 -m speech_recognition
With my mic plugged into the tower and it works, but when using a line in PyCharm or Thonny such as
import speech_recognition
print(speech_recognition.__version__)
I end up with
Traceback (most recent call last):
File "/home/elitree/SPRECOG/FU.py", line 1, in <module>
import speech_recognition
ModuleNotFoundError: No module named 'speech_recognition'
python version is 3.6
pip3 version is 19.1.1
Ubuntu version is Ubuntu 18.04.2 LTS
I can provide other system details if needed
I'm just not sure what to do now
As ForceBru explained to me - My IDE was using the wrong python interpreter.
Which is first identified by running the Python script in the terminal with python3 this_file.py
After this the problem could be fixed by identifying the correct interpreter using the command which python3 in the terminal and then configuring the IDE to use that interpreter.

Raspberry PI import tensorflow Segmentation fault

I have installed tensorflow on a Raspberry PI 3 and it worked correctly (following these instructions). After installing a number of libraries that I needed for loading a Keras model trained on my PC (numpy, scipy etc) I have observed the following error while importing tensorflow:
Runtime Error: module compiled against API version 0xc but this version of numpy is 0xa
Segmentation fault
I have updated all the necessary libraries, and importing any of them doesn't result in an error in a Python 3 script. Also the error is not keras related, because the statement import tensorflow raises an error no matter what follows after it. Should I uninstall tensorflow and start all over again?

python3.4 on raspberry pi 3 cant find cv2 module

I tried to install opencv2 to my raspberry pi 3 following this tutorial
pyimagesearch.com
,I made it to the end. But when I tried to run a program, it shows ImportError : no module named 'cv2' as in this picture screenshot.
The program is running well on python2.7.9, but why it pop that error in python 3.4? How can I fix this error? If anyone can help me it would be much appreciated, because I need that program to run in python3.4. Thank you
I fixed my own problem haha.. All I need is to copy cv2.so from /usr/local/lib/python3.4/dist-packages/cv2.so to /usr/lib/python3.4/cv2.so .... Tried my program after that, then it worked as good as in python2.7

Resources