-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added multi stream support; Added camera name in the meta information
- Loading branch information
Showing
5 changed files
with
93 additions
and
32 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 |
---|---|---|
@@ -1,3 +1,43 @@ | ||
# Image Sampling | ||
|
||
Image sampling samples still images from a camera stream. This is one of the fundamental ways for collecting dataset that will later be used in training machine learning models. This also gives a guidance on how an inferencing was performed -- an image taken approximately at the same time when the inference was performed (on the same scene) visually shows what the context was. | ||
Image sampling samples still images from a camera stream. This is one of the fundamental ways for collecting data that will later be used in training machine learning models. This also gives a guidance on how an inferencing was performed; an image taken approximately at the same time when the inference was performed (on the same scene) visually shows the context. | ||
|
||
# How to Use | ||
To run the program, | ||
|
||
```bash | ||
# Captures and publishes an image from the camera stream | ||
python3 app.py --stream bottom_camera | ||
``` | ||
|
||
### Capturing an Image from Multiple Streams | ||
|
||
```bash | ||
python3 app.py \ | ||
--stream bottom_camera \ | ||
--stream top_camera | ||
``` | ||
|
||
### Capturing and Saving Images Locally | ||
|
||
```bash | ||
# This does not publish images to the cloud, | ||
# instead they are saved locally | ||
python3 app.py \ | ||
--stream bottom_camera \ | ||
--out-dir /path/to/local/storage | ||
``` | ||
|
||
The directory will have a directory for each stream and be structured with subdirectories helping to organize the images. | ||
|
||
> NOTE: The directory structure recognizes those slashes (/) when creating subdirectories if the stream is a URL like rtsp://IP:PORT/stream. It will be /OUTDIR/RTSP:/IP:PORT/... | ||
### Capturing Images using Cronjob | ||
|
||
```bash | ||
# Capturing an image from the stream every hour. | ||
# Note that the program runs forever. | ||
python3 app.py \ | ||
--stream bottom_camera \ | ||
--cronjob "0 * * * *" | ||
``` |
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,3 +1,3 @@ | ||
pip | ||
croniter | ||
pywaggle[vision] == 0.55.* | ||
pywaggle[vision] == 0.56.* |
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