GithubHelp home page GithubHelp logo

c-ai / edgetpuvision Goto Github PK

View Code? Open in Web Editor NEW
8.0 1.0 5.0 20 MB

Google cloud edge TPU edgetpuvision research/learning repo

Python 78.18% JavaScript 20.71% CSS 0.23% HTML 0.46% Shell 0.43%
edge-computing edgetpu googlecloud googlecloudvision coralboard

edgetpuvision's Introduction

edgetpuvision

Google cloud edge TPU edgetpu default package.

What's up? Where to go
Got a Coral dev board. What do I do? official Getting Started Guide.
Can't get something working. The issue tracker is where we discuss problems.
Found something wrong in Google's docs. Stick it in the issue tracker so we can feedback to Google.
Created something would like to share. Stick it in the Pull Request so we can feedback to Google.

Overview

Officially, Google Coral is two devices:

Dev Board
A single-board computer with a removable system-on-module (SOM) featuring the Edge TPU.
*    Supported OS: Mendel Linux (derivative of Debian)
*    Supported Framework: TensorFlow Lite
*    Languages: Python (C++ coming soon)

and

USB Accelerator
A USB accessory featuring the Edge TPU that brings ML inferencing to existing systems.
*    Supported OS: Debian Linux
*    Compatible with Raspberry Pi boards
*    Supported Framework: TensorFlow Lite

Source: https://coral.withgoogle.com/

These devices are brand new, and as of right now there is very little supporting documentation(not mention no "Mendel Linux" could be found out there on the INTERNET). This repo exists to help us build up the community and help each others out.

edgetpuvision's People

Contributors

charlesccc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

edgetpuvision's Issues

classify_image.py RuntimeError: Failed to allocate tensors.

Hello Charles,
The Requirements
Any Linux computer with a USB port
Debian 6.0 or higher, or any derivative thereof (such as Ubuntu 10.0+)
System architecture of either x86_64 or ARM64 with ARMv8 instruction set

While I connect Edge tpu usb dongle to JETSON TX2 USB3 port,
installed edgetpu_api
and
cd /usr/local/lib/python3.5/dist-packages/edgetpu/demo
type
python3 classify_image.py --model /home/nvidia/Downloads/mobilenet_v2_1.0_224_inat_bird_quant_edgetpu.tflite --label /home/nvidia/Downloads/inat_bird_labels.txt --image /home/nvidia/Downloads/parrot.jpg

I got the error below:

Traceback (most recent call last): File "classify_image.py", line 67, in <module> main() File "classify_image.py", line 58, in main engine = ClassificationEngine(args.model) File "/usr/local/lib/python3.5/dist-packages/edgetpu/classification/engine.py", line 38, in __init__ super().__init__(model_path) File "/usr/local/lib/python3.5/dist-packages/edgetpu/swig/edgetpu_cpp_wrapper.py", line 300, in __init__ this = _edgetpu_cpp_wrapper.new_BasicEngine(*args) RuntimeError: Failed to allocate tensors.

Can you give me some comment about it ?

How can I display the video feed from a USB camera connected to the Coral Dev Board while controlling it with WSL on Windows 10?/How to use Coral Dev Board on win10?

Description

I am a newcomer using the Coral Dev Board. I want to connect a camera to the Coral Dev Board, run a model, and then send the results to a Windows host for processing and display.
Initially, I controlled Coral using WSL on Windows 10. I wrote some Python programs, pushed them to the development board to run, and communicated the running results on Coral to a program on Windows through socket communication. However, I found that I couldn't view the camera content successfully because Python scripts in WSL cannot use the graphical user interface.
I use socket communication to have the Coral send video data to the Windows side. The code can run, but the sending code on the Coral side only runs for a moment and then stops, with the following output:

mendel@purple-yarn:~$ python3 fasong.py

HOST IP: 127.0.0.1

LISTENING AT: ('192.168.101.2', 9999)

GOT CONNECTION FROM: ('192.168.101.82', 55082)

qt.qpa.xcb: could not connect to display

qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "/usr/local/lib/python3.7/dist-packages/cv2/qt/plugins" even though it was found.

This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: xcb.

Aborted 

Therefore, I attempted to control Coral directly on Windows 10 but encountered the following output:

17272@DESKTOP-FEIFH6G MINGW64 ~/Desktop
$ mdt shell
Waiting for a device...
Connecting to purple-yarn at 192.168.101.2
Key not present on purple-yarn -- pushing

Couldn't connect to keymaster on purple-yarn: [WinError 10061] The target computer actively refused the connection and could not be reached.

Did you previously connect from a different machine? If so,
mdt-keymaster will not be running as it only accepts a single key.

You will need to either:
   1) Remove the key from /home/mendel/.ssh/authorized_keys on the
      device via the serial console

- or -

   2) Copy the mdt private key from your home directory on this host
      in ~/.config/mdt/keys/mdt.key to the first machine and use
      'mdt pushkey mdt.key' to add that key to the device's
      authorized_keys file.

Failed to push via keymaster -- will attempt password login as a fallback.
Can't login using default credentials: Bad authentication type; allowed types: [
'publickey']

However, I can connect using the 'mdt shell' command in PuTTY, but when running a Python script in PuTTY to transmit image data via socket, I encounter the same issues as in WSL.

How can I achieve the desired functionality?

Click to expand!

Issue Type

Performance, Support

Operating System

Windows 10, Mendel Linux, Linux, Ubuntu

Coral Device

Dev Board

Other Devices

No response

Programming Language

Python 3.7

Relevant Log Output

WSL:
====================================
mendel@purple-yarn:~$ python3 fasong.py
HOST IP: 127.0.0.1
LISTENING AT: ('192.168.101.2', 9999)
GOT CONNECTION FROM: ('192.168.101.82', 52260)
qt.qpa.xcb: could not connect to display
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "/usr/local/lib/python3.7/dist-packages/cv2/qt/plugins" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: xcb.

Aborted

==================================
git bash:
==================================
17272@DESKTOP-FEIFH6G MINGW64 ~/Desktop
$ mdt devices
purple-yarn             (192.168.101.2)

17272@DESKTOP-FEIFH6G MINGW64 ~/Desktop
$ mdt shell
Waiting for a device...
Connecting to purple-yarn at 192.168.101.2
Looks like you don't have a private key yet. Generating one.
Key not present on purple-yarn -- pushing

Couldn't connect to keymaster on purple-yarn: [WinError 10061]The target computer actively refused the connection and could not be reached.

Did you previously connect from a different machine? If so,
mdt-keymaster will not be running as it only accepts a single key.

You will need to either:
   1) Remove the key from /home/mendel/.ssh/authorized_keys on the
      device via the serial console

- or -

   2) Copy the mdt private key from your home directory on this host
      in ~/.config/mdt/keys/mdt.key to the first machine and use
      'mdt pushkey mdt.key' to add that key to the device's
      authorized_keys file.

Failed to push via keymaster -- will attempt password login as a fallback.
Can't login using default credentials: Bad authentication type; allowed types: [
'publickey']
=================================
putty:
=================================
purple-yarn login: mendel
Password:
Last login: Wed Dec 27 12:58:58 UTC 2023 from 192.168.101.82 on pts/0
Linux purple-yarn 4.14.98-imx #1 SMP PREEMPT Tue Nov 2 02:55:21 UTC 2021 aarch64

The programs included with the Mendel GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Mendel GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
mendel@purple-yarn:~$ python3 fasong.py
HOST IP: 127.0.0.1
LISTENING AT: ('192.168.101.2', 9999)
GOT CONNECTION FROM: ('192.168.101.82', 52489)
qt.qpa.xcb: could not connect to display
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "/usr/local/lib/python3.7/dist-packages/cv2/qt/plugins" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: xcb.

Aborted

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.