-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #117 from grycap/devel
Devel
- Loading branch information
Showing
14 changed files
with
229 additions
and
19 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
functions: | ||
oscar: | ||
- oscar-cluster: | ||
name: grayify | ||
memory: 1Gi | ||
cpu: '1.0' | ||
image: grycap/imagemagick | ||
script: grayify.sh | ||
input: | ||
- storage_provider: minio | ||
path: grayify/in | ||
output: | ||
- storage_provider: minio | ||
path: grayify/out |
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,9 @@ | ||
# Mask detector workflow | ||
|
||
This example is based on the [SCAR's Mask detector hybrid workflow](https://github.com/grycap/scar/tree/master/examples/mask-detector-workflow), but, in this case, both services will be executed on top of an OSCAR cluster. | ||
|
||
The easy way to deploy the services is via [oscar-cli](https://github.com/grycap/oscar-cli), but [you can also use the UI](https://grycap.github.io/oscar/usage.html). | ||
|
||
 | ||
|
||
To trigger the workflow you only have to upload a video into the `input` folder of the `mask-detector` MinIO bucket, result images will be stored into the `result` folder of the same bucket when the workflow execution has been completed. |
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,16 @@ | ||
#!/bin/bash | ||
|
||
VIDEO_NAME=`basename "$INPUT_FILE_PATH"` | ||
SUBFOLDER_NAME=`echo "$VIDEO_NAME" | cut -f 1 -d '.'` | ||
OUTPUT_SUBFOLDER="$TMP_OUTPUT_DIR/$SUBFOLDER_NAME" | ||
|
||
mkdir "$OUTPUT_SUBFOLDER" | ||
|
||
echo "SCRIPT: Analyzing file '$INPUT_FILE_PATH', saving the output images in '$OUTPUT_SUBFOLDER'" | ||
|
||
ffmpeg -i "$INPUT_FILE_PATH" -vf fps=12/60 "$OUTPUT_SUBFOLDER/img%d.jpg" | ||
|
||
for IMAGE in "$OUTPUT_SUBFOLDER"/* | ||
do | ||
python auto_blur_image.py -i "$IMAGE" -o "$IMAGE" | ||
done |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 26 additions & 0 deletions
26
examples/mask-detector-workflow/mask-detector-workflow.yaml
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,26 @@ | ||
functions: | ||
oscar: | ||
- my_oscar: | ||
name: anon-and-split | ||
memory: 2Gi | ||
cpu: '1.0' | ||
image: grycap/blurry-faces | ||
script: blurry-faces.sh | ||
input: | ||
- storage_provider: minio | ||
path: mask-detector/input | ||
output: | ||
- storage_provider: minio | ||
path: mask-detector/intermediate | ||
- my_oscar: | ||
name: mask-detector | ||
memory: 1Gi | ||
cpu: '1.0' | ||
script: mask-detector.sh | ||
image: grycap/mask-detector-yolo:mini | ||
input: | ||
- storage_provider: minio | ||
path: mask-detector/intermediate | ||
output: | ||
- storage_provider: minio | ||
path: mask-detector/result |
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 @@ | ||
#!/bin/bash | ||
|
||
SUBFOLDER_NAME=`basename "$(dirname "$STORAGE_OBJECT_KEY")"` | ||
|
||
mkdir "$TMP_OUTPUT_DIR/$SUBFOLDER_NAME" | ||
|
||
IMAGE_NAME=`basename "$INPUT_FILE_PATH"` | ||
OUTPUT_IMAGE="$TMP_OUTPUT_DIR/$SUBFOLDER_NAME/$IMAGE_NAME" | ||
|
||
echo "SCRIPT: Analyzing file '$INPUT_FILE_PATH', saving the output image in '$OUTPUT_IMAGE'" | ||
|
||
python mask-detector-image.py --image "$INPUT_FILE_PATH" --output "$OUTPUT_IMAGE" | ||
|
15 changes: 15 additions & 0 deletions
15
examples/plant-classification-theano/plant-classification-theano.yaml
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,15 @@ | ||
|
||
functions: | ||
oscar: | ||
- oscar-cluster: | ||
name: plants | ||
memory: 1Gi | ||
cpu: '1.0' | ||
image: grycap/oscar-theano-plants | ||
script: plants.sh | ||
input: | ||
- storage_provider: minio | ||
path: plants/in | ||
output: | ||
- storage_provider: minio | ||
path: plants/out |
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,14 @@ | ||
functions: | ||
oscar: | ||
- oscar-cluster: | ||
name: radiomics | ||
memory: 1Gi | ||
cpu: '1.0' | ||
image: grycap/oscar-radiomics | ||
script: user-script.sh | ||
input: | ||
- storage_provider: minio | ||
path: radiomics/in | ||
output: | ||
- storage_provider: minio | ||
path: radiomics/out |
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,26 @@ | ||
functions: | ||
oscar: | ||
- oscar-cluster: | ||
name: split-video | ||
memory: 1Gi | ||
cpu: '1.0' | ||
image: grycap/ffmpeg | ||
script: split-video.sh | ||
input: | ||
- storage_provider: minio | ||
path: video-process/in | ||
output: | ||
- storage_provider: minio | ||
path: video-process/med | ||
- oscar-cluster: | ||
name: darknet | ||
memory: 1Gi | ||
cpu: '1.0' | ||
image: grycap/darknet-v3 | ||
script: yolov3-object-detection.sh | ||
input: | ||
- storage_provider: minio | ||
path: video-process/med | ||
output: | ||
- storage_provider: minio | ||
path: video-process/out |
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
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
Oops, something went wrong.