sciveo 0.1.79__tar.gz → 0.1.81__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {sciveo-0.1.79 → sciveo-0.1.81}/PKG-INFO +1 -1
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/cli.py +2 -2
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/media/capture/cam.py +15 -8
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/media/capture/draw.py +8 -4
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/media/capture/gst_server.py +19 -5
- sciveo-0.1.81/sciveo/media/capture/rpi.py +57 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/tools/configuration.py +6 -4
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/tools/daemon.py +2 -2
- sciveo-0.1.81/sciveo/version.py +2 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo.egg-info/PKG-INFO +1 -1
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo.egg-info/SOURCES.txt +1 -0
- sciveo-0.1.79/sciveo/version.py +0 -2
- {sciveo-0.1.79 → sciveo-0.1.81}/README.md +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/__init__.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/api/__init__.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/api/base.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/api/predictors.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/api/server.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/api/upload.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/common/__init__.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/common/configuration.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/common/model.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/common/optimizers.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/common/sampling.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/content/__init__.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/content/dataset.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/content/experiment.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/content/project.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/content/runner.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/db/__init__.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/db/read_table.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/media/__init__.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/media/capture/__init__.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/media/capture/games/__init__.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/media/capture/games/asteroids/__init__.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/media/capture/games/asteroids/asteroid.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/media/capture/games/asteroids/base_move.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/media/capture/games/asteroids/circle.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/media/capture/games/asteroids/game.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/media/capture/games/asteroids/geometrics.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/media/capture/games/asteroids/gravity_ball.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/media/capture/games/asteroids/laser.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/media/capture/games/asteroids/rocket.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/media/capture/games/asteroids/space_asteroids.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/media/capture/games/asteroids/volume_bar.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/media/capture/motion_detection.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/media/capture/nvr.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/media/capture/readers.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/media/capture/rtsp.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/media/ml/__init__.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/media/ml/base.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/media/ml/encoders/__init__.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/media/ml/encoders/base.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/media/ml/encoders/normalizer.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/media/ml/nlp/__init__.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/media/ml/nlp/search.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/media/ml/time_series/__init__.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/media/ml/time_series/dataset.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/media/ml/time_series/predictor.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/media/ml/time_series/trainer.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/media/ml/time_series/window_generator.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/media/pipelines/__init__.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/media/pipelines/base.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/media/pipelines/job_daemon.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/media/pipelines/layouts/__init__.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/media/pipelines/layouts/base.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/media/pipelines/pipeline.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/media/pipelines/postprocessors/__init__.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/media/pipelines/postprocessors/base.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/media/pipelines/postprocessors/default.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/media/pipelines/processors/__init__.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/media/pipelines/processors/audio/__init__.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/media/pipelines/processors/audio/audio.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/media/pipelines/processors/audio/audio_extractor_process.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/media/pipelines/processors/aws.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/media/pipelines/processors/base.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/media/pipelines/processors/file/__init__.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/media/pipelines/processors/file/archive.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/media/pipelines/processors/image/__init__.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/media/pipelines/processors/image/album.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/media/pipelines/processors/image/album_in_image.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/media/pipelines/processors/image/depth_esimation.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/media/pipelines/processors/image/embeddings.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/media/pipelines/processors/image/filters.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/media/pipelines/processors/image/generators.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/media/pipelines/processors/image/histogram.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/media/pipelines/processors/image/mask.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/media/pipelines/processors/image/object_detection.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/media/pipelines/processors/image/resize.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/media/pipelines/processors/image/segmentation.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/media/pipelines/processors/image/watermark.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/media/pipelines/processors/media_info.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/media/pipelines/processors/nlp/__init__.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/media/pipelines/processors/nlp/address.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/media/pipelines/processors/qr.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/media/pipelines/processors/sci/__init__.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/media/pipelines/processors/sci/base.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/media/pipelines/processors/sci/dataset.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/media/pipelines/processors/sci/time_series/__init__.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/media/pipelines/processors/sci/time_series/predictor.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/media/pipelines/processors/sci/time_series/trainer.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/media/pipelines/processors/tpu_base.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/media/pipelines/processors/video/__init__.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/media/pipelines/processors/video/generators.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/media/pipelines/processors/video/motion_detection.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/media/pipelines/processors/video/resize.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/media/pipelines/processors/video/video_album.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/media/pipelines/processors/video/video_frames.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/media/pipelines/processors/video/video_resample.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/media/pipelines/queues.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/media/pipelines/server.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/media/pipelines/web/__init__.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/media/pipelines/web/server.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/media/tools/__init__.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/media/tools/video_interactive.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/ml/__init__.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/ml/base.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/ml/dataset/__init__.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/ml/dataset/object_detection.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/ml/evaluation/__init__.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/ml/evaluation/markdown.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/ml/evaluation/object_detection.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/ml/images/__init__.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/ml/images/base.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/ml/images/description.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/ml/images/embeddings.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/ml/images/object_detection.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/ml/images/tools.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/ml/images/transformers.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/ml/nlp/__init__.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/ml/nlp/embeddings.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/ml/nlp/tokenizers/__init__.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/ml/nlp/tokenizers/bpe.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/ml/video/__init__.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/ml/video/description.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/monitoring/__init__.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/monitoring/monitor.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/monitoring/power/__init__.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/monitoring/power/ems300.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/monitoring/power/sim.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/monitoring/power/tools.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/monitoring/start.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/monitoring/watchdog/__init__.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/monitoring/watchdog/base.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/monitoring/watchdog/process.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/network/__init__.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/network/camera.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/network/sniffer.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/network/tools.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/tools/__init__.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/tools/array.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/tools/aws/__init__.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/tools/aws/priority_queue.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/tools/aws/s3.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/tools/common.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/tools/complexity.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/tools/compress.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/tools/crypto.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/tools/draw/__init__.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/tools/draw/contours.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/tools/formating.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/tools/hardware.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/tools/http.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/tools/logger.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/tools/os.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/tools/queue.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/tools/random.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/tools/remote.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/tools/simple_counter.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/tools/synchronized.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/tools/timers.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/tools/totp.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/web/__init__.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo/web/common.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo.egg-info/dependency_links.txt +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo.egg-info/entry_points.txt +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo.egg-info/requires.txt +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/sciveo.egg-info/top_level.txt +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/setup.cfg +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/setup.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/test/test_complexity.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/test/test_compress.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/test/test_configuration.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/test/test_crypto.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/test/test_eval_markdown.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/test/test_ml_datasets.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/test/test_monitoring.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/test/test_runner.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/test/test_sampling.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/test/test_tokenizers.py +0 -0
- {sciveo-0.1.79 → sciveo-0.1.81}/test/test_totp.py +0 -0
|
@@ -116,13 +116,13 @@ def main():
|
|
|
116
116
|
from sciveo.media.capture.gst_server import CamFactory, ColorBarFactory
|
|
117
117
|
data = json.loads(args.data_json)
|
|
118
118
|
if args.src_id is not None:
|
|
119
|
-
server = CamFactory(args.src_id, args.width, args.height, args.fps,
|
|
119
|
+
server = CamFactory(args.src_id, args.width, args.height, args.fps, configuration=data)
|
|
120
120
|
elif args.src is not None:
|
|
121
121
|
if "color" in args.src:
|
|
122
122
|
server = ColorBarFactory(args.width, args.height, args.fps)
|
|
123
123
|
else:
|
|
124
124
|
# warning("RTSP src", args.src, "not recognised")
|
|
125
|
-
server = CamFactory(args.src, args.width, args.height, args.fps,
|
|
125
|
+
server = CamFactory(args.src, args.width, args.height, args.fps, configuration=data)
|
|
126
126
|
server.serve(host=args.host, port=args.port, stream=args.stream)
|
|
127
127
|
elif args.command == 'media-server':
|
|
128
128
|
from sciveo.media.pipelines.server import __START_SCIVEO_MEDIA_SERVER__
|
|
@@ -46,23 +46,28 @@ class CaptureBase(DaemonBase):
|
|
|
46
46
|
pass
|
|
47
47
|
|
|
48
48
|
def loop(self):
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
self.fps.update()
|
|
49
|
+
self.read_frame()
|
|
50
|
+
self.fps.update()
|
|
52
51
|
|
|
53
52
|
|
|
54
53
|
class CameraDaemon(CaptureBase):
|
|
55
54
|
def __init__(self, cam_id=0, period=0):
|
|
56
55
|
super().__init__(src=cam_id, tag="cam", period=period)
|
|
57
|
-
self.
|
|
58
|
-
|
|
56
|
+
self.init_cam()
|
|
57
|
+
|
|
58
|
+
def init_cam(self):
|
|
59
|
+
debug(self.src, "starting...")
|
|
60
|
+
self.cap = cv2.VideoCapture(self.src)
|
|
59
61
|
time.sleep(1)
|
|
62
|
+
debug(self.src, "started")
|
|
60
63
|
|
|
61
64
|
def close(self):
|
|
62
65
|
self.cap.release()
|
|
63
66
|
|
|
64
67
|
def read_frame(self):
|
|
65
|
-
ret,
|
|
68
|
+
ret, frame = self.cap.read()
|
|
69
|
+
with self.lock_frame:
|
|
70
|
+
self.frame = frame
|
|
66
71
|
|
|
67
72
|
|
|
68
73
|
class PredictorCameraDaemon(DaemonBase):
|
|
@@ -142,8 +147,10 @@ class ScreenDaemon(CaptureBase):
|
|
|
142
147
|
|
|
143
148
|
def read_frame(self):
|
|
144
149
|
sct_img = self.sct.grab(self.monitor)
|
|
145
|
-
|
|
146
|
-
|
|
150
|
+
frame = np.array(sct_img)
|
|
151
|
+
frame = cv2.cvtColor(frame, cv2.COLOR_BGRA2BGR)
|
|
152
|
+
with self.lock_frame:
|
|
153
|
+
self.frame = frame
|
|
147
154
|
|
|
148
155
|
|
|
149
156
|
if __name__ == '__main__':
|
|
@@ -16,7 +16,7 @@ from sciveo.tools.logger import *
|
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
class DrawNone:
|
|
19
|
-
def __call__(self, frame,
|
|
19
|
+
def __call__(self, frame, configuration):
|
|
20
20
|
return frame
|
|
21
21
|
|
|
22
22
|
class DrawDateTime:
|
|
@@ -34,7 +34,7 @@ class DrawDateTime:
|
|
|
34
34
|
self.font = font
|
|
35
35
|
self.font_scale_factor = font_scale_factor
|
|
36
36
|
|
|
37
|
-
def __call__(self, frame,
|
|
37
|
+
def __call__(self, frame, configuration):
|
|
38
38
|
"""
|
|
39
39
|
Draws date/time (or custom text) on the frame.
|
|
40
40
|
|
|
@@ -45,9 +45,13 @@ class DrawDateTime:
|
|
|
45
45
|
if frame is None or len(frame.shape) < 2:
|
|
46
46
|
return frame # invalid frame
|
|
47
47
|
|
|
48
|
+
tag = configuration.get("tag", "")
|
|
49
|
+
|
|
48
50
|
h, w = frame.shape[:2]
|
|
49
51
|
|
|
50
|
-
font_scale = max(0.2, h * self.font_scale_factor)
|
|
52
|
+
font_scale = configuration.get("font_scale", max(0.2, h * self.font_scale_factor))
|
|
53
|
+
color = configuration.get("color", self.color)
|
|
54
|
+
thickness = configuration.get("thickness", self.thickness)
|
|
51
55
|
|
|
52
56
|
date_text = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
|
|
53
57
|
draw_text = f"{tag} {date_text}"
|
|
@@ -56,7 +60,7 @@ class DrawDateTime:
|
|
|
56
60
|
x = min(max(self.position[0], 0), w - 1)
|
|
57
61
|
y = min(max(self.position[1] + int(font_scale * 20), int(font_scale * 20)), h - 1)
|
|
58
62
|
|
|
59
|
-
cv2.putText(frame, draw_text, (x, y), self.font, font_scale,
|
|
63
|
+
cv2.putText(frame, draw_text, (x, y), self.font, font_scale, color, thickness, cv2.LINE_AA)
|
|
60
64
|
return frame
|
|
61
65
|
|
|
62
66
|
|
|
@@ -18,6 +18,7 @@ from gi.repository import Gst, GObject, GstRtspServer, GLib
|
|
|
18
18
|
Gst.init(None)
|
|
19
19
|
|
|
20
20
|
from sciveo.tools.logger import *
|
|
21
|
+
from sciveo.tools.timers import FPSCounter
|
|
21
22
|
from sciveo.media.capture.draw import *
|
|
22
23
|
from sciveo.media.capture.cam import CameraDaemon
|
|
23
24
|
|
|
@@ -30,6 +31,7 @@ class RTSPFactoryBase(GstRtspServer.RTSPMediaFactory):
|
|
|
30
31
|
self.fps = fps
|
|
31
32
|
self.appsrc_name = appsrc_name
|
|
32
33
|
self.set_shared(True)
|
|
34
|
+
self.fps_next_frame = FPSCounter(period=10, tag=f"{appsrc_name} ({self.width}x{self.height}@{self.fps})")
|
|
33
35
|
|
|
34
36
|
def do_create_element(self, url):
|
|
35
37
|
pipeline_str = (
|
|
@@ -114,28 +116,40 @@ class ColorBarFactory(RTSPFactoryBase):
|
|
|
114
116
|
self.gen = ColorBarsGenerator(width=width, height=height)
|
|
115
117
|
|
|
116
118
|
def next_frame(self):
|
|
119
|
+
self.fps_next_frame.update()
|
|
117
120
|
return self.gen.next_frame()
|
|
118
121
|
|
|
119
122
|
|
|
120
123
|
class CamFactory(ColorBarFactory):
|
|
121
|
-
def __init__(self, cam_id, width, height, fps,
|
|
124
|
+
def __init__(self, cam_id, width, height, fps, configuration={}):
|
|
122
125
|
super().__init__(width, height, fps, appsrc_name=f"cam{cam_id}")
|
|
123
|
-
self.
|
|
124
|
-
self.
|
|
125
|
-
self.list_draw = list_draw
|
|
126
|
+
self.cam_id = cam_id
|
|
127
|
+
self.configuration = configuration
|
|
126
128
|
self.list_draw_processors = {
|
|
127
129
|
"none": DrawNone(),
|
|
128
130
|
"dt": DrawDateTime(),
|
|
129
131
|
}
|
|
130
132
|
|
|
133
|
+
self.init_cam()
|
|
134
|
+
self.cam.start()
|
|
135
|
+
|
|
136
|
+
def init_cam(self):
|
|
137
|
+
if "RPI" in self.configuration:
|
|
138
|
+
from sciveo.media.capture.rpi import RPICamera
|
|
139
|
+
self.cam = RPICamera(cam_id=self.cam_id, width=self.width, height=self.height)
|
|
140
|
+
else:
|
|
141
|
+
self.cam = CameraDaemon(cam_id=self.cam_id)
|
|
142
|
+
|
|
131
143
|
def next_frame(self):
|
|
132
144
|
frame = self.cam.read()
|
|
133
145
|
if frame is None:
|
|
134
146
|
frame = super().next_frame()
|
|
135
147
|
|
|
136
|
-
for k, v in self.
|
|
148
|
+
for k, v in self.configuration.get("draw", {}).items():
|
|
137
149
|
self.list_draw_processors.get(k, DrawNone())(frame, v)
|
|
138
150
|
|
|
151
|
+
self.fps_next_frame.update()
|
|
152
|
+
|
|
139
153
|
return frame
|
|
140
154
|
|
|
141
155
|
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
#
|
|
2
|
+
# Pavlin Georgiev, Softel Labs
|
|
3
|
+
#
|
|
4
|
+
# This is a proprietary file and may not be copied,
|
|
5
|
+
# distributed, or modified without express permission
|
|
6
|
+
# from the owner. For licensing inquiries, please
|
|
7
|
+
# contact pavlin@softel.bg.
|
|
8
|
+
#
|
|
9
|
+
# 2024
|
|
10
|
+
#
|
|
11
|
+
|
|
12
|
+
import time
|
|
13
|
+
import numpy as np
|
|
14
|
+
import cv2
|
|
15
|
+
from picamera2 import Picamera2
|
|
16
|
+
|
|
17
|
+
from sciveo.tools.logger import *
|
|
18
|
+
from sciveo.media.capture.cam import CameraDaemon
|
|
19
|
+
from sciveo.media.capture.gst_server import CamFactory
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
class RPICamera(CameraDaemon):
|
|
23
|
+
def __init__(self, cam_id=0, width=640, height=480, period=0):
|
|
24
|
+
self.width = width
|
|
25
|
+
self.height = height
|
|
26
|
+
super().__init__(cam_id=cam_id, period=period)
|
|
27
|
+
|
|
28
|
+
def init_cam(self):
|
|
29
|
+
debug(self.src, "starting...")
|
|
30
|
+
|
|
31
|
+
self.picam2 = Picamera2()
|
|
32
|
+
config = self.picam2.create_video_configuration(
|
|
33
|
+
main={
|
|
34
|
+
"size": (self.width, self.height),
|
|
35
|
+
"format": "RGB888"
|
|
36
|
+
},
|
|
37
|
+
buffer_count=4
|
|
38
|
+
)
|
|
39
|
+
self.picam2.configure(config)
|
|
40
|
+
self.picam2.start()
|
|
41
|
+
|
|
42
|
+
time.sleep(1)
|
|
43
|
+
debug(self.src, "started")
|
|
44
|
+
|
|
45
|
+
def close(self):
|
|
46
|
+
self.picam2.stop()
|
|
47
|
+
|
|
48
|
+
def read_frame(self):
|
|
49
|
+
frame = self.picam2.capture_array()
|
|
50
|
+
cv2.cvtColor(frame, cv2.COLOR_RGB2BGR)
|
|
51
|
+
with self.lock_frame:
|
|
52
|
+
self.frame = frame
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
class RPICameraFactory(CamFactory):
|
|
56
|
+
def init_cam(self):
|
|
57
|
+
self.cam = RPICamera(cam_id=self.cam_id, width=self.width, height=self.height)
|
|
@@ -13,6 +13,8 @@ import os
|
|
|
13
13
|
import json
|
|
14
14
|
import threading
|
|
15
15
|
|
|
16
|
+
from sciveo.tools.logger import *
|
|
17
|
+
|
|
16
18
|
|
|
17
19
|
class GlobalConfiguration:
|
|
18
20
|
config = None
|
|
@@ -20,8 +22,8 @@ class GlobalConfiguration:
|
|
|
20
22
|
|
|
21
23
|
def __init__(self, name) -> None:
|
|
22
24
|
home = os.path.expanduser('~')
|
|
23
|
-
self.name = name
|
|
24
|
-
self.base_path = os.path.join(home, f'.{name}')
|
|
25
|
+
self.name = name.lower()
|
|
26
|
+
self.base_path = os.path.join(home, f'.{self.name}')
|
|
25
27
|
self.data = {}
|
|
26
28
|
|
|
27
29
|
self.default = {
|
|
@@ -33,7 +35,7 @@ class GlobalConfiguration:
|
|
|
33
35
|
self.read_local_files()
|
|
34
36
|
self.read_environment()
|
|
35
37
|
except Exception as e:
|
|
36
|
-
|
|
38
|
+
exception(e)
|
|
37
39
|
|
|
38
40
|
@staticmethod
|
|
39
41
|
def get(name='sciveo', reload=False):
|
|
@@ -52,7 +54,7 @@ class GlobalConfiguration:
|
|
|
52
54
|
return self.data.get(key, self.default.get(key, None))
|
|
53
55
|
|
|
54
56
|
def save_kv(self, key, value):
|
|
55
|
-
key = key.strip().lower().replace("
|
|
57
|
+
key = key.strip().lower().replace(f"{self.name}_", "")
|
|
56
58
|
value = value.strip()
|
|
57
59
|
self.data[key] = value
|
|
58
60
|
|
|
@@ -73,14 +73,14 @@ class DaemonBase:
|
|
|
73
73
|
try:
|
|
74
74
|
self.loop()
|
|
75
75
|
except Exception as e:
|
|
76
|
-
|
|
76
|
+
exception(e)
|
|
77
77
|
time.sleep(self.period)
|
|
78
78
|
|
|
79
79
|
def safe_run(self):
|
|
80
80
|
try:
|
|
81
81
|
self.run()
|
|
82
82
|
except Exception as e:
|
|
83
|
-
|
|
83
|
+
exception(e)
|
|
84
84
|
|
|
85
85
|
|
|
86
86
|
class TasksDaemon(DaemonBase):
|
|
@@ -34,6 +34,7 @@ sciveo/media/capture/gst_server.py
|
|
|
34
34
|
sciveo/media/capture/motion_detection.py
|
|
35
35
|
sciveo/media/capture/nvr.py
|
|
36
36
|
sciveo/media/capture/readers.py
|
|
37
|
+
sciveo/media/capture/rpi.py
|
|
37
38
|
sciveo/media/capture/rtsp.py
|
|
38
39
|
sciveo/media/capture/games/__init__.py
|
|
39
40
|
sciveo/media/capture/games/asteroids/__init__.py
|
sciveo-0.1.79/sciveo/version.py
DELETED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sciveo-0.1.79 → sciveo-0.1.81}/sciveo/media/pipelines/processors/audio/audio_extractor_process.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sciveo-0.1.79 → sciveo-0.1.81}/sciveo/media/pipelines/processors/sci/time_series/__init__.py
RENAMED
|
File without changes
|
{sciveo-0.1.79 → sciveo-0.1.81}/sciveo/media/pipelines/processors/sci/time_series/predictor.py
RENAMED
|
File without changes
|
{sciveo-0.1.79 → sciveo-0.1.81}/sciveo/media/pipelines/processors/sci/time_series/trainer.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|