首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >断层分块--流场

断层分块--流场
EN

Stack Overflow用户
提问于 2020-03-11 14:36:03
回答 1查看 1.6K关注 0票数 2

嗨,我得到了以下错误:“分割故障”在我的覆盆子Pi 4型号B,我是跟随大卫·田的“建造智能机器人车指南”,它使用深度学习

一些重要的信息:

  • 树莓Pi 4型B型
  • Raspbian Buster
  • Python3 3.7.3
  • (Pip3 20.0.2)
  • TensorFlow 2.0.0
  • Keras 2.3.1
  • OpenCV 4.1.0
  • (ROS旋律)

起初,我试图为TensorFlow安装EdgeTPU,如下所示:

代码语言:javascript
复制
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

这不适用于新的树莓Pi 4,所以我跟踪了本指令

代码语言:javascript
复制
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

这不是我的问题。这个例子很好用。

回到田的向导,我试着跟随

代码语言:javascript
复制
cd ~/DeepPiCar/models/object_detection/
python3 code/coco_object_detection.py
Segmentation fault

您可以查看这段代码这里

我不确定它是配置还是安装,还是代码中的问题。我认为分割故障是由于珊瑚边缘TPU造成的。

我也试过

代码语言:javascript
复制
sudo apt-get update
sudo apt-get install python3-edgetpu

我还能做什么?有人能帮忙吗?提前谢谢。

EN

回答 1

Stack Overflow用户

发布于 2021-04-07 16:35:12

我在Pi 3B上也有同样的问题--我得到的跟踪输出如下:

代码语言:javascript
复制
--- modulename: coco_object_detection, funcname: 
coco_object_detection.py(28): labels = dict((int(k), v) for k, v in pairs)
--- modulename: coco_object_detection, funcname: 
coco_object_detection.py(27): pairs = (l.strip().split(maxsplit=1) for l in f.readlines())
coco_object_detection.py(31): IM_WIDTH = 640
coco_object_detection.py(32): IM_HEIGHT = 480
coco_object_detection.py(33): camera = cv2.VideoCapture(0)
coco_object_detection.py(34): ret = camera.set(3,IM_WIDTH)
coco_object_detection.py(35): ret = camera.set(4,IM_HEIGHT)
coco_object_detection.py(37): font = cv2.FONT_HERSHEY_SIMPLEX
coco_object_detection.py(38): bottomLeftCornerOfText = (10,IM_HEIGHT-10)
coco_object_detection.py(39): fontScale = 1
coco_object_detection.py(40): fontColor = (255,255,255) # white
coco_object_detection.py(41): boxColor = (0,0,255) # RED?
coco_object_detection.py(42): boxLineWidth = 1
coco_object_detection.py(43): lineType = 2
coco_object_detection.py(45): annotate_text = ""
coco_object_detection.py(46): annotate_text_time = time.time()
coco_object_detection.py(47): time_to_show_prediction = 1.0 # ms
coco_object_detection.py(48): min_confidence = 0.20
coco_object_detection.py(51): engine = edgetpu.detection.engine.DetectionEngine(args.model)
--- modulename: engine, funcname: init
engine.py(69): if device_path:
engine.py(72): super().init(model_path)
--- modulename: basic_engine, funcname: init
basic_engine.py(36): if device_path:
basic_engine.py(40): self._engine = BasicEnginePythonWrapper.CreateFromFile(model_path)
free(): invalid pointer
Aborted
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/60638523

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档