-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* First prep-work for client AND server-side ImageDetectorPlugins * Callback for image detector plugins added * Callback logic now manages to correctly identify client and server * Enabling Docker Support (#5) * Initial dockerfile version * Bugfixes around unit-testing for move to REQ/REP pattern and addtl logging * Further bugfixes w/ detection threshold, new default warning files * docker-compose * Various Docker updates of unknown origins ¯\_(ツ)_/¯ * Audio plugin working w/ docker * Changelog update
- Loading branch information
1 parent
d2d5df0
commit 9294828
Showing
29 changed files
with
408 additions
and
108 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
FROM python:3.8-buster | ||
|
||
|
||
# Volumes | ||
VOLUME /config | ||
VOLUME /models | ||
VOLUME /data | ||
|
||
# ZMQ | ||
EXPOSE 5454 | ||
# Audio | ||
EXPOSE 5557 | ||
|
||
# Dir | ||
WORKDIR /tmp | ||
|
||
# Copy setup | ||
COPY README.md ./ | ||
COPY setup.py ./ | ||
COPY sbin/ ./sbin/ | ||
COPY scarecrow_server/ ./scarecrow_server/ | ||
COPY scarecrow_client/ ./scarecrow_client/ | ||
COPY scarecrow_core/ ./scarecrow_core/ | ||
COPY models/ ./models/ | ||
|
||
# Install protoc | ||
RUN apt-get update | ||
RUN apt-get install -y protobuf-compiler alsa-utils | ||
|
||
# Update pip | ||
RUN pip install --upgrade pip | ||
RUN pip install wheel | ||
|
||
# Run setup | ||
RUN pip install . --upgrade | ||
|
||
# Install the models manually to ensure protobuf works | ||
RUN bash ./sbin/install_tensorflow_models.sh | ||
|
||
# Start | ||
ENTRYPOINT ["/usr/local/bin/python3"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,40 @@ | ||
# Overall configuration file | ||
|
||
[Video] | ||
FPS=20 | ||
FPS=15 | ||
|
||
[Detection] | ||
min_detections=10 | ||
min_confidence=0.7 | ||
; If enabled, sets a threshold in seconds for how long the detection will pause after a detection; -1 = disabled | ||
DetectionStopThresholdSeconds=20 | ||
|
||
# This is the receiver / subscriber | ||
# The server uses this to receive messages | ||
[ZmqCamera] | ||
IP=127.0.0.1 | ||
# This is left blank, as it will always bind to `*` | ||
IP= | ||
Port=5454 | ||
Protocol=tcp | ||
; 0=zmq.PAIR, 1=zmq.REQ/zmq.REP; 2=zmq.PUB,zmq.SUB | ||
Pattern=1 | ||
|
||
# This is the publisher, i.e. the camera | ||
[ZmqServer] | ||
IP=127.0.0.1 | ||
Port=5454 | ||
# In other words, this is the IP of the camera, despite the name | ||
# TODO: change that... | ||
IP=192.xxx.x.xxx | ||
Port=5455 | ||
Protocol=tcp | ||
; 0=zmq.PAIR, 1=zmq.REQ/zmq.REP; 2=zmq.PUB,zmq.SUB | ||
Pattern=1 | ||
|
||
[Tensorflow] | ||
ModelUrl=ssdlite_mobilenet_v2_coco_2018_05_09 | ||
LabelMapPath=models/research/object_detection/data/mscoco_label_map.pbtxt # Should be an absolute path | ||
# This setting assumes a run with Docker | ||
LabelMapPath=/models/mscoco_complete_label_map.pbtxt | ||
|
||
[Plugins] | ||
UseSenderThread=False | ||
Enabled=store_video,audio | ||
Disabled= | ||
UseSenderThread=True | ||
Enabled=audio | ||
Disabled=store_video,motion |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
[ZmqSender] | ||
IP=127.0.0.1 | ||
Port=5557 | ||
IP=0.0.0.0 | ||
Port=5558 | ||
|
||
[ZmqReceiver] | ||
IP=127.0.0.1 | ||
Port=5557 | ||
IP=0.0.0.0 | ||
Port=5558 | ||
|
||
[Audio] | ||
Streamer=pygame | ||
Path=../audio_files | ||
# This setting assumes a run with Docker - needs a file called "warning.wav" | ||
Path=/data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
version: '3' | ||
services: | ||
scarecrow-server: | ||
build: . | ||
image: scarecrow | ||
networks: | ||
scarecrow-net: | ||
ipv4_address: 10.1.0.100 | ||
ports: | ||
- "5455:5454" | ||
- "5557:5557" | ||
volumes: | ||
- ./conf:/config | ||
- ./models/research/object_detection/data:/models | ||
command: ["/usr/local/bin/scarecrow_server", "--config", "/config"] | ||
deploy: | ||
restart_policy: | ||
condition: any | ||
|
||
|
||
scarecrow-camera: | ||
build: . | ||
image: scarecrow | ||
networks: | ||
scarecrow-net: | ||
ipv4_address: 10.1.0.101 | ||
ports: | ||
- "5454:5454" | ||
- "5558:5558" | ||
volumes: | ||
- ./conf:/config | ||
- ./resources/audio_files:/data | ||
devices: | ||
- /dev/video2:/dev/video0 | ||
deploy: | ||
restart_policy: | ||
condition: any | ||
command: ["/usr/local/bin/scarecrow_client", "--config", "/config", "--input", "0"] | ||
depends_on: | ||
- scarecrow-server | ||
|
||
networks: | ||
scarecrow-net: | ||
driver: bridge | ||
ipam: | ||
driver: default | ||
config: | ||
- subnet: 10.1.0.0/24 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file.
Binary file not shown.
Binary file not shown.
Oops, something went wrong.