{"id":15020548,"url":"https://github.com/leswright1977/rpi4-google-coral","last_synced_at":"2025-10-26T04:30:35.615Z","repository":{"id":38239083,"uuid":"194851303","full_name":"leswright1977/RPi4-Google-Coral","owner":"leswright1977","description":"Google Coral on the Raspberry Pi 4","archived":false,"fork":false,"pushed_at":"2020-04-08T14:27:32.000Z","size":27823,"stargazers_count":92,"open_issues_count":0,"forks_count":27,"subscribers_count":14,"default_branch":"master","last_synced_at":"2024-10-30T03:31:03.653Z","etag":null,"topics":["coral","python","raspberry-pi-4","rpi4"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/leswright1977.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-07-02T11:36:21.000Z","updated_at":"2024-07-30T00:37:20.000Z","dependencies_parsed_at":"2022-09-04T23:50:33.274Z","dependency_job_id":null,"html_url":"https://github.com/leswright1977/RPi4-Google-Coral","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leswright1977%2FRPi4-Google-Coral","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leswright1977%2FRPi4-Google-Coral/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leswright1977%2FRPi4-Google-Coral/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leswright1977%2FRPi4-Google-Coral/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leswright1977","download_url":"https://codeload.github.com/leswright1977/RPi4-Google-Coral/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238258936,"owners_count":19442503,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["coral","python","raspberry-pi-4","rpi4"],"created_at":"2024-09-24T19:55:15.288Z","updated_at":"2025-10-26T04:30:30.570Z","avatar_url":"https://github.com/leswright1977.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RPi4-Google-Coral\nGoogle Coral on the Raspberry Pi 4\n\n***Update 31/10/2019***\nIt looks like Coral software is now updated at https://coral.withgoogle.com/docs/accelerator/get-started/\nFollow the installation there now, and consider this install script deprecated.\nThe example scripts I have provided still work however.\n\nIf you the new Coral install process, also install one of the Edge TPU API examples to satisfy dependencies before running my scripts.\nI use this one here: https://coral.ai/examples/classify-image/\n\nYout will receive Warnings when the scripts run (DetectWithImage is now deprecated, use detect_with_image instead, an easy fix!)\n\n\n\n\n\n***Video up on youtube***\nhttps://youtu.be/T-VjYr7sZC4\n\n***Update 3 July 2019***\n\nI have written a live object detection script (see src/picam_TPU.py)\nThis is similar to the scripts I used with the NCS2, but for the Coral TPU.\nIt is a test script, so models and labels are hardcoded. I wanted to it be as close to the original scripts I wrote for the NCS in order to do a fair comparison.\n\nSo far, I am getting over 36FPS video and over 36FPS inferencing on a single TPU!\nI will do a proper test in the daylight. Room lights at night are not sufficient.\n\n![Screenshot](src/home.gif)\n\n***Update 4 July 2019***\n\nI have written another object detection script for video files (see src/video_TPU.py)\nSince we can push video through the loop as fast as we can, it is possible to get 70fps and still do reasonable inferencing!\n\n![Screenshot](src/traffic.gif)\n\n\n***Getting the Coral to work with the Pi 4***\n\nThe Google Coral Edge TPU device can be made to work with the Raspberry Pi 4 \n\nAs per the instructions at: https://coral.withgoogle.com/docs/accelerator/get-started/\n\n```bash\nwget https://dl.google.com/coral/edgetpu_api/edgetpu_api_latest.tar.gz -O edgetpu_api.tar.gz --trust-server-names\ntar xzf edgetpu_api.tar.gz\ncd edgetpu_api\n```\n\n\nREPLACE install.sh with the one I have in src\n\nTHEN run the script ;-)\n\nNote, when you run the demos, instead of here:\n/usr/local/lib/python3.5/dist-packages/edgetpu/demo\n\nyou need to be here!:\n/usr/local/lib/python3.7/dist-packages/edgetpu/demo\n\nThis script does a number of things:\n\nAdded:\n```bash\n  elif [[ \"${MODEL}\" == \"Raspberry Pi 4 Model B Rev\"* ]]; then #edit for rpi4\n    info \"Recognized as Raspberry Pi 4.\"\n    LIBEDGETPU_SUFFIX=arm32\n    HOST_GNU_TYPE=arm-linux-gnueabihf\n ```\n    \n    \n Fixed this (which caused the script to bomb with \"Need To Be Root\":\n ```bash\n sudo udevadm control --reload-rules \u0026\u0026 udevadm trigger\n ```\n to this:\n ```bash\n sudo udevadm control --reload-rules \u0026\u0026 sudo udevadm trigger  #needed to put sudo in second half of command...\n ```\n \n Finally as Raspian buster uses python 3.7 added:\n ```bash\n if [[ \"${MODEL}\" == \"Raspberry Pi 4 Model B Rev\"* ]]; then #edit for rpi4\n    info \"Lib Fu.\"\n    sudo cp /usr/local/lib/python3.7/dist-packages/edgetpu/swig/_edgetpu_cpp_wrapper.cpython-35m-arm-linux-gnueabihf.so /usr/local/lib/python3.7/dist-packages/edgetpu/swig/_edgetpu_cpp_wrapper.cpython-37m-arm-linux-gnueabihf.so\nfi\n```\n\nNote, all this does is copy the python wrapper (compiled for python 3.5) and use 37 instead of 35 in the filename. \nTerrible undiscovered things may happen, or they may not, but it all seems to work for me!\n\nAll the examples supplied in the packages appear to work correctly.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleswright1977%2Frpi4-google-coral","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleswright1977%2Frpi4-google-coral","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleswright1977%2Frpi4-google-coral/lists"}