Hi I got the following error: "Segmentation fault" on my Raspberry Pi 4 Model B. I am following David Tian's Guide to build a Smart Robot Car which uses Deep Learning.
Some important informations:
- Raspberry Pi 4 Model B
- Raspbian Buster
- Python3 3.7.3
- (Pip3 20.0.2)
- TensorFlow 2.0.0
- Keras 2.3.1
- OpenCV 4.1.0
- (ROS melodic)
At first I tried to install TensorFlow for the EdgeTPU like this:
wget https://dl.google.com/coral/edgetpu_api/edgetpu_api_latest.tar.gz -O edgetpu_api.tar.gz --trust-server-names
tar xzf edgetpu_api.tar.gz
cd edgetpu_api/
bash ./install.sh -y
sudo reboot now
Well that`s not working on the new Raspberry Pi 4, so I followed this instruction
echo "deb https://packages.cloud.google.com/apt coral-edgetpu-stable main" | sudo tee /etc/apt/sources.list.d/coral-edgetpu.list
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
sudo apt-get update
sudo apt-get install libedgetpu1-std
pip3 install https://dl.google.com/coral/python/tflite_runtime-2.1.0.post1-cp37-cp37m-linux_armv7l.whl
sudo apt-get install libedgetpu1-max
mkdir coral && cd coral
git clone https://github.com/google-coral/tflite.git
cd tflite/python/examples/classification
bash install_requirements.sh
python3 classify_image.py \
--model models/mobilenet_v2_1.0_224_inat_bird_quant_edgetpu.tflite \
--labels models/inat_bird_labels.txt \
--input images/parrot.jpg
Well this isn`t my problem. This example works fine.
Back to Tian's Guide, I tried following
cd ~/DeepPiCar/models/object_detection/
python3 code/coco_object_detection.py
Segmentation fault
You can look at this code here
I'm not sure if it is an configuration or an installation or a problem within this code. I think the segmentation fault occurs because of the Coral Edge TPU.
I also tried
sudo apt-get update
sudo apt-get install python3-edgetpu
What else should I do? Can anyone help? Thanks in advance.