-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
23,838 additions
and
0 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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,13 @@ | ||
ground_truth,image_name | ||
animal,/example_images/labrador-pup.jpg | ||
animal,/example_images/baby-red-fox.jpg | ||
animal,/example_images/panda-cub.jpg | ||
animal,/example_images/cheetah-baby.jpg | ||
animal,/example_images/golden-pup.jpg | ||
animal,/example_images/german-shep-pup.jpg | ||
unknown,/example_images/APL_Keyset_800x290.jpg | ||
empty,/example_images/blank02.jpeg | ||
empty,/example_images/blank01.jpeg | ||
empty,/example_images/blank04.jpeg | ||
empty,/example_images/blank03.jpg | ||
empty,/example_images/blank05.jpeg |
11,597 changes: 11,597 additions & 0 deletions
11,597
releases/latest/config/ground_truth_dir/ground_truth_ena.csv
Large diffs are not rendered by default.
Oops, something went wrong.
11,597 changes: 11,597 additions & 0 deletions
11,597
releases/latest/config/ground_truth_dir/ground_truth_ena_megadetector.csv
Large diffs are not rendered by default.
Oops, something went wrong.
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,6 @@ | ||
{ | ||
"path": "https://storage.googleapis.com/public-datasets-lila/ena24/ena24.zip", | ||
"timestamp": "600", | ||
"callingFunction": "simpleNext", | ||
"burstQuantity": "5" | ||
} |
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,6 @@ | ||
{ | ||
"path": "/example_images", | ||
"timestamp": "600", | ||
"callingFunction": "simpleNext", | ||
"burstQuantity": "5" | ||
} |
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,22 @@ | ||
# This configuration file is used by the image_store_plugin. | ||
|
||
# Set one or more thresholds that the image_store_plugin will | ||
# use to determine the disposition of an image. Threshold values | ||
# are floating point numbers between 0.0 and 1.0. The numbers | ||
# must have a 0 or 1 to the left of the decimal point and at | ||
# least 1 digit to the right. | ||
# | ||
# The possible thresholds and their meanings when an image has | ||
# a score that exceeds the threshold value are: | ||
# | ||
# Save - save the image file | ||
# ReduceSave - reduce the image resolution and save | ||
# Delete - discard the image | ||
# | ||
# The highest score in an image's list of scores determines the | ||
# action. If no 0.0 threshold is explicitly assigned, "Delete = 0.0" | ||
# is implicitly assigned. | ||
# | ||
[action_thresholds] | ||
Save = 0.7 | ||
ReduceSave = 0.4 |
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,80 @@ | ||
# This is the camera-traps application configuration file for versions 0.1.x of the application. | ||
# It assumes the use of containers and docker-compose as the deployment mechanism. | ||
|
||
title = "Camera-Traps Application Configuration Latest" | ||
|
||
# The event engine's publish and subscribe port used to create the event_engine::App instance. | ||
publish_port = 5559 | ||
subscribe_port = 5560 | ||
|
||
# An absolute path to the image directory is required but a file name prefix is optional. | ||
# If present the prefix is preprended to generated image file names. This is the directory | ||
# into which the image_recv_plugin writes incoming images and the image_store_plugin may | ||
# delete images or output the scores for images. | ||
images_output_dir = "/root/camera-traps/images" | ||
# image_file_prefix = "" | ||
|
||
# The container for both internal and external plugins. Internal plugins are written in rust | ||
# and compiled into the camera-traps application. External plugins are usually written in | ||
# python but can be written in any language. External plugins run in their own processes | ||
# and communicate via tcp or ipc. | ||
[plugins] | ||
# Uncomment the internal plugins loaded when the camera-traps application starts. | ||
internal = [ | ||
# "image_gen_plugin", | ||
"image_recv_plugin", | ||
# "image_score_plugin", | ||
"image_store_plugin", | ||
# "observer_plugin" | ||
] | ||
|
||
# Configure each of the active internal plugins with the image processing action they should | ||
# take when new work is received. If no action is specified for a plugin, its no-op action | ||
# is used by default. | ||
internal_actions = [ | ||
"image_recv_write_file_action", | ||
"image_store_file_action" | ||
] | ||
|
||
# External plugins require more configuration information than internal plugins. | ||
# Each plugin must subscribe to PluginTerminateEvent. | ||
# | ||
# Note that each plugin must specify the external port to use in TWO PLACES: here as well as | ||
# in the docker-compose.yml file. If external_port changes here, it must ALSO be changed in the | ||
# docker-compose.yml file. | ||
[[plugins.external]] | ||
plugin_name = "ext_image_gen_plugin" | ||
id = "d3266646-41ec-11ed-a96f-5391348bab46" | ||
external_port = 6000 | ||
subscriptions = [ | ||
"PluginTerminateEvent" | ||
] | ||
[[plugins.external]] | ||
plugin_name = "ext_image_score_plugin" | ||
id = "d6e8e42a-41ec-11ed-a36f-a3dcc1cc761a" | ||
external_port = 6001 | ||
subscriptions = [ | ||
"ImageReceivedEvent", | ||
"PluginTerminateEvent" | ||
] | ||
[[plugins.external]] | ||
plugin_name = "ext_power_monitor_plugin" | ||
id = "4a0fca25-1935-472a-8674-58f22c3a32b3" | ||
external_port = 6010 | ||
subscriptions = [ | ||
"MonitorPowerStartEvent", | ||
"MonitorPowerStopEvent", | ||
"PluginTerminateEvent" | ||
] | ||
[[plugins.external]] | ||
plugin_name = "ext_oracle_monitor_plugin" | ||
id = "6e153711-9823-4ee6-b608-58e2e801db51" | ||
external_port = 6011 | ||
subscriptions = [ | ||
"ImageScoredEvent", | ||
"ImageStoredEvent", | ||
"ImageDeletedEvent", | ||
"ImageReceivedEvent", | ||
"PluginTerminateEvent", | ||
"PluginTerminatingEvent" | ||
] |
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,177 @@ | ||
version: "3.0" | ||
|
||
networks: | ||
cameratraps: | ||
driver: bridge | ||
|
||
services: | ||
# the name `engine` is important here; in general, the sevice name is addressable by other conatiners on the same | ||
# docker network. The default "hostname" used by the python plugin library (pyevents) is "engine" | ||
engine: | ||
container_name: engine | ||
image: tapis/camera_traps_engine:latest | ||
networks: | ||
- cameratraps | ||
environment: | ||
- TRAPS_CONFIG_FILE=/traps.toml | ||
volumes: | ||
# mount the traps.toml in the current working directory. | ||
- ./config/traps.toml:/traps.toml:ro | ||
# mount the image output directory from the host to the directory specified in traps.toml | ||
# Docker compose hijacks $HOME so we use a workaround. If the source directory doesn't | ||
# exist it will be created with root ownership. | ||
- ./images_output_dir:/root/camera-traps/images | ||
# mount the log4rs configuration file over the baked into the image. Comment out | ||
# this mount if you want to use the image's default logging configuration. | ||
- ../../resources/log4rs.yml:/resources/log4rs.yml | ||
|
||
imageGeneratingPlugin: | ||
container_name: image_generating | ||
image: tapis/image_generating_plugin_py:latest | ||
networks: | ||
- cameratraps | ||
pid: host | ||
depends_on: | ||
- engine | ||
environment: | ||
- IMAGE_GENERATING_PLUGIN_PORT=6000 | ||
- MONITOR_POWER=true | ||
- ORACLE_IMAGE_MAPPING_OUTPUT=/output | ||
- INPUT_IMAGE_PATH=/example_images | ||
- GROUND_TRUTH_FILE=/ground_truth_dir/ground_truth.csv | ||
- MODEL_TYPE=0 | ||
volumes: | ||
# mount the traps.toml in the current working directory. | ||
- ./config/traps.toml:/traps.toml:ro | ||
# mount the example images directory; this is the source of the images used for | ||
# generating NewImage events. The path `/example_images` is the default path | ||
# where the plugin looks for images. This can be changed by providing a different | ||
# configuration file. | ||
# NOTE: this is NOT the shared images directory!! | ||
- ../common/example_images:/example_images:ro | ||
# The following is optional but can be used to mount a different configuration file | ||
# into the Image Generating plugin. Note that if doing so, values in the configuration | ||
# file must match configurations provided in other parts of this file. | ||
- ./config/ground_truth_dir:/ground_truth_dir | ||
- ./oracle_plugin_dir:/output | ||
|
||
imageScoringPlugin: | ||
container_name: image_scoring | ||
image: tapis/image_scoring_plugin_py_3.8:latest | ||
networks: | ||
- cameratraps | ||
pid: host | ||
# Uncomment the following line to use GPUs with the Image Scoring pluging. Note that | ||
# the NVIDIA drivers must be installed, the NVIDIA container toolkit installed, and | ||
# Docker must be configured to use it. See the README for details. | ||
# | ||
# UNCOMMENT -------------- | ||
deploy: | ||
resources: | ||
reservations: | ||
devices: | ||
- driver: nvidia | ||
count: all # Use 'all' or specify the number of GPUs you want to use | ||
capabilities: [ gpu ] | ||
# -------------------------- | ||
depends_on: | ||
- engine | ||
- imageGeneratingPlugin | ||
environment: | ||
- IMAGE_SCORING_PLUGIN_PORT=6001 | ||
- IMAGE_SCORING_LOG_LEVEL=DEBUG | ||
# The IMAGE_PATH variable needs to match what is specified in the vouume mount below for the | ||
# container path portion of the shared images directory. | ||
- IMAGE_PATH=/input_images | ||
# The IMAGE_PATH_PREFIX is optional and needs to agree with the image_file_prefix | ||
# variable in the traps.toml file; when not being used, comment the line. | ||
# - IMAGE_FILE_PREFIX= | ||
- MONITOR_POWER=true | ||
- CROP_IMAGE=false | ||
- DETECTIONS=false | ||
# The type of ML model to use for scoring; comment or set to 0 to use the built in model; otherwise, | ||
# a model file will be downloaded at the start of the script corresponding to the type passed. | ||
- MODEL_TYPE=0 | ||
volumes: | ||
# mount the traps.toml in the current working directory. | ||
# NOTE -- not currently used (TODO) | ||
- ./config/traps.toml:/traps.toml:ro | ||
# mount the shared images directory from the host to the container directory specified in the | ||
# IMAGE_PATH environment variable, above. | ||
- ./images_output_dir:/input_images | ||
|
||
powerMonitorPlugin: | ||
# USAGE Example: | ||
# In your plugins, import the necessary: | ||
# E.g. Image_scoring_plugin.py: | ||
# | ||
# from ctevents.ctevents import send_power_measure_fb_event | ||
# import os | ||
# | ||
# When trying to measure power: | ||
# my_pids = [os.getpid()] # any pids you want to measure | ||
# monitor_type = [0] # 0 for CPU & GPU, 1 for CPU, 2 for GPU (TODO: 3 for DRAM) | ||
# monitor_duration = 10 # seconds | ||
# send_power_measure_fb_event(socket, my_pids, monitor_type, monitor_duration) | ||
# | ||
container_name: power_monitor | ||
image: tapis/power_measuring_plugin_py:latest | ||
networks: | ||
- cameratraps | ||
# Reading the Intel RAPL (Linux Powercap) interface requires privileges | ||
privileged: true | ||
# Ee also require being in the host namespace (as with all other processes) so we | ||
# can read the proc table for information about their processes | ||
pid: host | ||
# Uncomment the following line to use GPUs with the Power Monitor pluging. Note that | ||
# the NVIDIA drivers must be installed, the NVIDIA container toolkit installed, and | ||
# Docker must be configured to use it. See the README for details. | ||
# UNCOMMENT -------------- | ||
# deploy: | ||
# resources: | ||
# reservations: | ||
# devices: | ||
# - driver: nvidia | ||
# count: all # Use 'all' or specify the number of GPUs you want to use | ||
# capabilities: [ gpu ] | ||
# ------------------------ | ||
depends_on: | ||
- engine | ||
- imageGeneratingPlugin | ||
- imageScoringPlugin | ||
environment: | ||
- POWER_MEASURING_PLUGIN_PORT=6010 | ||
# Note: this LOG_PATH is the path in the conatiner, so must match the RHS of the mount below. | ||
- TRAPS_POWER_LOG_PATH=/logs | ||
# This is the log path on the *host*; this is needed when using the powerjoular backend, which | ||
# runs in a separate container | ||
- TRAPS_POWER_LOG_HOST_PATH=/home/jstubbs/gits/tapis/camera-traps-main/releases/latest/power_output_dir | ||
- TRAPS_POWER_LOG_LEVEL=DEBUG | ||
- TRAPS_POWER_BACKEND=powerjoular | ||
- TRAPS_TEST_POWER_FUNCTION=1 | ||
# 1 for debug; Set to 0 when actually use it to measure other plugin's power | ||
volumes: | ||
# mount the traps.toml in the current working directory. | ||
- ./config/traps.toml:/traps.toml:ro | ||
- ./power_output_dir:/logs # Path for CPU and GPU power logs | ||
# mount the docker socket for starting powerjoular containers | ||
- /var/run/docker.sock:/var/run/docker.sock | ||
|
||
oraclePlugin: | ||
container_name: oracle_monitor | ||
image: tapis/oracle_plugin:latest | ||
environment: | ||
- ORACLE_PLUGIN_PORT=6011 | ||
- TRAPS_ORACLE_OUTPUT_PATH=/output | ||
networks: | ||
- cameratraps | ||
pid: host | ||
|
||
depends_on: | ||
- engine | ||
- imageGeneratingPlugin | ||
- imageScoringPlugin | ||
|
||
volumes: | ||
- ./config/traps.toml:/traps.toml:ro | ||
- ./oracle_plugin_dir:/output |