Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

birdfeeder.sh script doesn't run correctly #16

Open
aotmaie opened this issue Dec 31, 2021 · 10 comments
Open

birdfeeder.sh script doesn't run correctly #16

aotmaie opened this issue Dec 31, 2021 · 10 comments
Assignees
Labels
Hardware:Coral Camera Coral Camera issues Hardware:Dev Board Coral Dev Board issues subtype:macOS macOS Build/installation issues type:bug Bug type:performance Performance issues

Comments

@aotmaie
Copy link

aotmaie commented Dec 31, 2021

Description

I am trying to run the birdfeeder.sh script with all the directories correctly listed in the script, and whenever I do ./birdfeeder.sh to run the script in my command prompt it tries to run it but immediately pauses and doesn't complete the operation. I have to do Control + C to manually exit the process or else it never ends on its own. What is the issue with the script? Is there something wrong with the code I am using?

EDIT: Forgot to mention, I don't have the speaker connected to the board. Don't know if that would have an effect on the process, thought it would be useful to know.

Click to expand!

Issue Type

Bug, Performance

Operating System

Mac OS

Coral Device

Dev Board, Coral Camera

Other Devices

No response

Programming Language

No response

Relevant Log Output

Loading /home/mendel/project-birdfeeder-master/mobilenet_v2_1.0_224_quant_edgetpu.tflite with /home/mendel/project-birdfeeder-master/imagenet_labels.txt labels.
Detected EdgeTPU dev board.
Gstreamer pipeline:  v4l2src device=/dev/video0 ! video/x-raw,format=YUY2,width=640,height=480,framerate=30/1 ! queue max-size-buffers=1 leaky=downstream  ! tee name=t
            t. ! queue max-size-buffers=1 leaky=downstream ! glupload ! glfilterbin filter=glcolorscale
               ! video/x-raw,format=RGBA,width=320,height=180 ! videoconvert ! video/x-raw,format=RGB,width=320,height=180 ! appsink name=appsink sync=false emit-signals=true max-buffers=1 drop=true
            t. ! queue max-size-buffers=1 leaky=downstream ! glupload ! glfilterbin filter=glcolorscale
               ! rsvgoverlay name=overlay ! waylandsink
@google-coral-bot google-coral-bot bot added Hardware:Coral Camera Coral Camera issues Hardware:Dev Board Coral Dev Board issues subtype:macOS macOS Build/installation issues type:bug Bug type:performance Performance issues labels Dec 31, 2021
@hjonnala
Copy link
Contributor

hjonnala commented Jan 3, 2022

Hi @aotmaie can you please test and confirm coral camera working as expected using "snapshot" command. Thanks!

@aotmaie
Copy link
Author

aotmaie commented Jan 25, 2022

@hjonnala , The camera is working correctly. Is there something else that is causing this issue?

@hjonnala
Copy link
Contributor

@aotmaie We have tested with coral camera and it is working fine. Can you please try these steps and share the logs of all steps. Thanks!

git clone https://github.com/google-coral/project-birdfeeder.git
cd project-birdfeeder
sh install_requirements.sh
sh birdfeeder.sh

@aotmaie
Copy link
Author

aotmaie commented Jan 30, 2022

Hi,

This is the log of what happened. It still gives the same issue.

Cmendel@vexing-snail:/project-birdfeeder-master$
mendel@vexing-snail:
/project-birdfeeder-master$ git clone https://github.com/google-coral/project-birdfeeder.git
Cloning into 'project-birdfeeder'...
remote: Enumerating objects: 264, done.
remote: Counting objects: 100% (217/217), done.
remote: Compressing objects: 100% (204/204), done.
remote: Total 264 (delta 24), reused 201 (delta 12), pack-reused 47
Receiving objects: 100% (264/264), 19.67 MiB | 6.53 MiB/s, done.
Resolving deltas: 100% (47/47), done.
mendel@vexing-snail:/project-birdfeeder-master$ cd project-birdfeeder
mendel@vexing-snail:
/project-birdfeeder-master/project-birdfeeder$ sh install_requirements.sh
Requirement already satisfied: svgwrite in /home/mendel/.local/lib/python3.7/site-packages (1.4.1)
Requirement already satisfied: playsound in /home/mendel/.local/lib/python3.7/site-packages (1.3.0)
Requirement already satisfied: PyGObject in /usr/lib/python3/dist-packages (3.30.4)
Requirement already satisfied: pycairo>=1.11.1 in /usr/lib/python3/dist-packages (from PyGObject) (1.16.2)
Looking in indexes: https://pypi.org/simple, https://google-coral.github.io/py-repo/
Requirement already satisfied: pycoral~=2.0 in /usr/lib/python3/dist-packages (2.0.0)
Requirement already satisfied: tflite-runtime==2.5.0.post1 in /usr/lib/python3/dist-packages (from pycoral~=2.0) (2.5.0.post1)
rm: cannot remove 'mobilenet_v2_1.0_224_quant_edgetpu.tflite': No such file or directory
--2022-01-30 06:12:08-- https://dl.google.com/coral/canned_models/mobilenet_v2_1.0_224_quant_edgetpu.tflite
Resolving dl.google.com (dl.google.com)... 2607:f8b0:4005:805::200e, 216.58.194.206
Connecting to dl.google.com (dl.google.com)|2607:f8b0:4005:805::200e|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 4084184 (3.9M) [application/octet-stream]
Saving to: ‘mobilenet_v2_1.0_224_quant_edgetpu.tflite’

mobilenet_v2_1.0_224_quant_edgetpu.tflite 100%[===============================================================================================================================================================================>] 3.89M 1.06MB/s in 3.7s

2022-01-30 06:12:13 (1.06 MB/s) - ‘mobilenet_v2_1.0_224_quant_edgetpu.tflite’ saved [4084184/4084184]

rm: cannot remove 'imagenet_labels.txt': No such file or directory
--2022-01-30 06:12:13-- https://dl.google.com/coral/canned_models/imagenet_labels.txt
Resolving dl.google.com (dl.google.com)... 2607:f8b0:4005:805::200e, 216.58.194.206
Connecting to dl.google.com (dl.google.com)|2607:f8b0:4005:805::200e|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 27691 (27K) [text/plain]
Saving to: ‘imagenet_labels.txt’

imagenet_labels.txt 100%[===============================================================================================================================================================================>] 27.04K --.-KB/s in 0.05s

2022-01-30 06:12:13 (574 KB/s) - ‘imagenet_labels.txt’ saved [27691/27691]

mendel@vexing-snail:~/project-birdfeeder-master/project-birdfeeder$ sh birdfeeder.sh
Loading models/mobilenet_v2_1.0_224_quant_edgetpu.tflite with labels/imagenet_labels.txt labels.
Detected EdgeTPU dev board.
Gstreamer pipeline: v4l2src device=/dev/video0 ! video/x-raw,format=YUY2,width=640,height=480,framerate=30/1 ! queue max-size-buffers=1 leaky=downstream ! tee name=t
t. ! queue max-size-buffers=1 leaky=downstream ! glupload ! glfilterbin filter=glcolorscale
! video/x-raw,format=RGBA,width=320,height=180 ! videoconvert ! video/x-raw,format=RGB,width=320,height=180 ! appsink name=appsink sync=false emit-signals=true max-buffers=1 drop=true
t. ! queue max-size-buffers=1 leaky=downstream ! glupload ! glfilterbin filter=glcolorscale
! rsvgoverlay name=overlay ! waylandsink

@aotmaie
Copy link
Author

aotmaie commented Jan 30, 2022

Also, when I tried running the "snapshot" command the coral camera doesn't do anything. I tried using a USB camera but that also is giving the same issue.

@hjonnala
Copy link
Contributor

@aotmaie if snapshot is not working then there is some issue with coral camera. With USB camera please try sh birdfeeder_dev_board.sh script. Thanks!

@aotmaie
Copy link
Author

aotmaie commented Feb 13, 2022

@hjonnala , I just tried that and was trying to debug my code, but can't seem to find the issue. I am getting this error:

mendel@vexing-snail:~/project-birdfeeder-master$ sh birdfeeder_dev_board.sh
import is success
usage: bird_classify.py [-h] --model MODEL --labels LABELS
[--videosrc VIDEOSRC] [--top_k TOP_K]
[--threshold THRESHOLD] --storage STORAGE --sound
SOUND [--print PRINT] [--training]
bird_classify.py: error: unrecognized arguments: project-birdfeeder-master/project-birdfeeder/labels/imagenet_labels.txt

@aotmaie
Copy link
Author

aotmaie commented Feb 24, 2022

Is the error caused by the fact that I'm trying to run the program using a different camera?

@hjonnala
Copy link
Contributor

@aotmaie If you are able to run other gstremaer exampels with usb camera then you would be able to this demo also. Please try the command below with project-birdfeeder as base directory.

python3 bird_classify.py \
	--model models/mobilenet_v2_1.0_224_quant_edgetpu.tflite \
	--labels labels/imagenet_labels.txt \
	--videosrc /dev/video1 \
	--storage sdcard_directory \
	--sound sound_file.wav \
	--print True

@aotmaie
Copy link
Author

aotmaie commented Mar 1, 2022

@hjonnala do you want me to change the paths to match the paths in the
image you sent above when I run the python3 bird_classify.py command?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Hardware:Coral Camera Coral Camera issues Hardware:Dev Board Coral Dev Board issues subtype:macOS macOS Build/installation issues type:bug Bug type:performance Performance issues
Projects
None yet
Development

No branches or pull requests

2 participants