Cov txheej txheem:
- Kauj ruam 1: Hloov kho Raspberry Pi
- Kauj ruam 2: Nruab TensorFlow
- Kauj ruam 3: Nruab OpenCV
- Kauj ruam 4: Nruab Protobuf
- Kauj Ruam 5: Teeb TensorFlow Directory Structure
- Kauj Ruam 6: Tshawb Pom Lub Hom Phiaj
- Kauj Ruam 7: Teeb Meem thiab Ua Tsaug
Video: Raspberry Pi Kev Tshawb Nrhiav Lub Hom Phiaj: 7 Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:26
Phau ntawv qhia no qhia ib qib zuj zus cov lus qhia yuav teeb tsa TensorFlow's Object Detection API ntawm Raspberry Pi. Los ntawm ua raws cov theem hauv phau ntawv qhia no, koj yuav tuaj yeem siv koj li Raspberry Pi los ua qhov ntsuas pom ntawm cov vis dis aus nyob ntawm Picamera lossis USB webcam. Kev siv lub tshuab kev kawm tsis tas yuav siv raws li siv hauv online database rau kev txheeb xyuas qhov khoom. Koj tuaj yeem tshawb pom feem ntau ntawm cov khoom uas feem ntau siv thoob ntiaj teb.
Thov xa mus rau kuv daim duab saum toj no, peb siv tus nas, Kua thiab Txiab thiab pom cov khoom zoo kawg nkaus.
Phau ntawv qhia taug kev hla cov theem hauv qab no:
Hloov kho Raspberry Pi
Nruab TensorFlowInstall OpenCV
Sau thiab teeb tsa Protobuf
Teeb tsa TensorFlow phau ntawv teev npe qauv
Tshawb xyuas cov khoom
Kauj ruam 1: Hloov kho Raspberry Pi
Koj li Raspberry Pi yuav tsum tau hloov kho tshiab
Kauj ruam 1:
Ntaus hauv Command qhov davhlau ya nyob twg, sudo apt-tau hloov tshiab
Thiab tom qab ntawd Hom
sudo apt-tau nruab dist-upgrade
Qhov no Yuav Siv Sijhawm Ntev nyob ntawm koj li Internet thiab Raspberry pi
Qhov ntawd yog txhua yam koj xav tau, koj tau ua tiav Hloov Kho koj li Raspberry pi
Kauj ruam 2: Nruab TensorFlow
Tam sim no, peb tab tom yuav nruab Tensorflow.
Ntaus cov lus txib hauv qab no, pip3 nruab TensorFlow
TensorFlow tseem xav tau pob LibAtlas, Ntaus cov lus txib hauv qab no
sudo apt-tau nruab libatlas-base-dev
Thiab ntaus cov lus txib hauv qab no ib yam nkaus, sudo pip3 nruab hauv ncoo lxml jupyter matplotlib cythonsudo apt-tau nruab python-tk
Tam sim no, Peb tau ua tiav Txhim Kho Tensorflow.
Kauj ruam 3: Nruab OpenCV
Tam sim no peb tab tom ua haujlwm Txhim Kho OpenCV lub tsev qiv ntawv vim tias TensorFlow cov khoom ntsuas pom piv txwv siv matplotlib los qhia cov duab, tab sis kuv xaiv los xyaum OpenCV txij li nws yooj yim ua haujlwm nrog thiab tsawg dua qhov ua yuam kev. Yog li, peb yuav tsum teeb tsa OpenCV. Tam sim no OpenCV tsis txhawb nqa RPI, yog li peb yuav teeb tsa Kev Txheeb Xyuas qub.
Tam sim no peb tab tom ua haujlwm los teeb tsa ob peb qhov kev vam khom uas yuav tsum tau teeb tsa ntawm apt-get
sudo apt-tau nruab libjpeg-dev libtiff5-dev libjasper-dev libpng12-dev
sudo apt-tau nruab libavcodec-dev libavformat-dev libswscale-dev libv4l-dev
sudo apt-tau nruab libxvidcore-dev libx264-dev
sudo apt-tau nruab qt4-dev-cuab yeej libatlas-base-dev
Thaum kawg, Tam sim no peb tuaj yeem nruab OpenCV los ntawm kev ntaus ntawv, pip3 nruab opencv-python == 3.4.6.27
Qhov ntawd yog txhua yam, tam sim no peb tau teeb tsa OpenCV
Kauj ruam 4: Nruab Protobuf
TensorFlow cov khoom ntsuas pom API siv Protobuf, pob uas tso rau Google Cov Txheej Txheem Tsis Cov ntaub ntawv hom. Koj yuav tsum tau suav sau los ntawm qhov chaw, tam sim no koj tuaj yeem teeb tsa tau yooj yim.
sudo apt-tau nruab protobuf-compiler
Khiav raws tu qauv -kev hloov pauv ib zaug uas ua tiav. Koj yuav tsum tau txais cov lus teb ntawm libprotoc 3.6.1 lossis zoo sib xws.
Kauj Ruam 5: Teeb TensorFlow Directory Structure
Peb tau teeb tsa tag nrho cov pob khoom, peb xav teeb tsa cov npe rau TensorFlow. Los ntawm cov npe hauv tsev, tsim cov npe npe hu ua "tensorflow1", Ntaus cov hauv qab no, mkdir tensorflow1cd tensorflow1
Tam sim no rub tawm TensorFlow los ntawm kev ntaus ntawv, git clone --depth 1
Peb xav hloov kho PYTHONPATH ib puag ncig sib txawv kom ncaj ntawm qee cov npe hauv TensorFlow chaw cia khoom. Peb xav tau PYTHONPATH los teeb tsa txhua lub sijhawm. Peb yuav tsum kho cov ntaub ntawv.bashrc. Peb yuav tsum qhib nws los ntawm Typing
sudo nano ~/.bashrc
Thaum kawg ntawm cov ntawv, thiab kab kawg ntxiv cov lus txib, zoo li hauv daim duab saum toj kawg nkaus uas tau cim rau ntawm lub thawv xim liab.
export PYTHONPATH = $ PYTHONPATH:/tsev/pi/tensorflow1/qauv/tshawb fawb:/tsev/pi/tensorflow1/qauv/tshawb fawb/slim
Tam sim no txuag thiab tawm. Peb yuav tsum siv Txoj Cai los sau cov Txheej Txheem Tsis (.proto) cov ntaub ntawv siv los ntawm Lub Hom Phiaj Tshawb Nrhiav API. Cov ntaub ntawv.proto nyob hauv /tshawb fawb /object_detection /protos, peb xav ua kom tiav cov lus txib los ntawm /tshawb nrhiav cov npe. Ntaus nram qab no hais kom ua
cd/tsev/pi/tensorflow1/ua qauv/tshawb fawbprotoc object_detection/protos/*. proto --python_out =.
Cov lus txib no hloov tag nrho "npe".proto cov ntaub ntawv rau "name_pb2".py cov ntaub ntawv.
cd/tsev/pi/tensorflow1/qauv/tshawb fawb/object_detection
Peb yuav tsum rub tawm SSD_Lite tus qauv los ntawm TensorFlowdetection qauv zoo. Txog qhov no, peb xav siv SSDLite-MobileNet, uas yog tus qauv nrawm tshaj plaws rau RPI.
Google tsis muaj qhov kawg tso cov qauv nrog txhim kho nrawm thiab ua tau zoo, yog li tshawb xyuas ntau zaus yog tias muaj cov qauv txhim kho.
Ntaus cov lus txib hauv qab no txhawm rau rub tawm SSDLite-MobileNet tus qauv.
wget
tar -xzvf ssdlite_mobilenet_v2_coco_2018_05_09.tar.gz
Tam sim no peb tuaj yeem muaj peev xwm xyaum ua qauv Object_Detction!
Peb yuav luag tiav!
Kauj Ruam 6: Tshawb Pom Lub Hom Phiaj
Tam sim no txhua yam tau teeb tsa rau kev ua tiav cov khoom pom ntawm Pi!
Object_detection_picamera.py pom cov khoom nyob hauv los ntawm Picamera lossis USB webcam.
Yog tias koj siv Picamera, hloov pauv Raspberry Pi teeb tsa cov ntawv qhia zaub mov zoo li hauv daim duab saum toj no cim hauv lub thawv xim liab.
Ntaus cov lus txib hauv qab no txhawm rau rub tawm Object_detection_picamera.py cov ntaub ntawv mus rau hauv phau ntawv teev npe object_detection.
wget https://raw.githubusercontent.com/EdjeElectronics/ TensorFlow-Object-Detection-on-the-Raspberry-Pi/master/Object_detection_picamera.py
python3 Object_detection_picamera.py
Ntaus cov lus txib hauv qab no rau USB lub koob yees duab
python3 Object_detection_picamera.py --usbcam
Ib tus hais kom ua tiav, tom qab 1 feeb qhib lub qhov rai tshiab uas yuav pib tshawb pom cov khoom !!!
Kauj Ruam 7: Teeb Meem thiab Ua Tsaug
Thov qhia rau kuv paub yog tias koj muaj lus nug
Email: [email protected]
Ua tsaug, Rithik
Pom zoo:
Kev Tshawb Nrhiav Lub Hom Phiaj Nrog Sipeed MaiX Boards (Kendryte K210): 6 Cov Kauj Ruam
Kev Tshawb Nrhiav Lub Hom Phiaj Nrog Sipeed MaiX Boards (Kendryte K210): Raws li txuas ntxiv ntawm kuv tsab xov xwm dhau los txog kev lees paub cov duab nrog Sipeed MaiX Boards, Kuv txiav txim siab sau lwm qhov kev qhia, tsom mus rau cov khoom pom. Muaj qee qhov kho vajtse nthuav tawm tsis ntev los no nrog Kendryte K210 nti, suav nrog S
Lub Hom Phiaj Taw Qhia: Tsim Lub Hom Phiaj Kawm/Qhia Txoj Kev/Cov Txheej Txheem Siv Cov Duab Puncher: 5 Kauj Ruam
Lub Hom Phiaj Taw Qhia: Tsim Lub Hom Phiaj Kawm/Qhia Txoj Kev/Cov Qauv Siv Cov Duab Puncher: Kawm/qhia txoj hauv kev rau cov tub ntxhais kawm tshiab rau kev tsom mus rau lub hom phiaj. Nov yog txoj hauv kev tso cai rau lawv kom pom kev thiab pom cov txheej txheem ntawm kev tsim cov khoom los ntawm cov chav kawm. EkTools 2-nti loj punch; cov duab zoo tshaj plaws. 2. Daim ntawv los yog c
Kev Tshawb Nrhiav Xim Raws Li Lub Hom Phiaj Taug Kev: 10 Kauj Ruam
Kev Tshawb Nrhiav Xim Raws Li Lub Hom Phiaj Nrhiav: Zaj Dab Neeg Kuv tau ua qhov haujlwm no kom kawm paub ua duab siv Raspberry PI thiab qhib CV. Txhawm rau ua txoj haujlwm no kom zoo dua Kuv tau siv ob lub SG90 Servo motors thiab teeb lub koob yees duab rau nws. Ib lub cav siv txav mus rau kab rov tav thiab lub cav thib ob siv txav lub kaum sab xis
Lub Hom Phiaj Taw Qhia: Tsim Lub Hom Phiaj Kawm/Qhia Txuj Ci/Txuj Ci Siv Txiab: 5 Kauj Ruam
Lub Hom Phiaj Taw Qhia: Tsim Lub Hom Phiaj Kawm/Qhia Txoj Kev/Txuj Ci Siv Txiab: Kawm/qhia txoj hauv kev rau cov tub ntxhais kawm tshiab rau lub hom phiaj ua haujlwm. Nov yog ib txoj hauv kev tso cai rau lawv kom pom kev thiab pom cov txheej txheem ntawm kev tsim cov khoom los ntawm cov chav kawm.Parts: 1. Txiab (yam twg yuav ua). 2. Daim ntawv lossis daim npav. 3. Marker… nyeem ntxiv
Kev Tshawb Nrhiav Lub Hom Phiaj W/ Dragonboard 410c lossis 820c Siv OpenCV thiab Tensorflow: 4 Kauj Ruam
Kev Tshawb Nrhiav Lub Hom Phiaj W/ Dragonboard 410c lossis 820c Siv OpenCV thiab Tensorflow.: Cov lus qhia no piav qhia yuav ua li cas rau nruab OpenCV, Tensorflow, thiab tshuab kev kawm ua haujlwm rau Python 3.5 kom ua tiav Daim Ntawv Thov Kev Tshawb Fawb