sciveo 0.1.82__tar.gz → 0.1.84__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.
Files changed (191) hide show
  1. {sciveo-0.1.82 → sciveo-0.1.84}/PKG-INFO +1 -1
  2. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/media/capture/gst_server.py +17 -4
  3. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/media/capture/nvr.py +6 -1
  4. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/media/capture/rpi.py +7 -4
  5. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/media/capture/rtsp.py +6 -1
  6. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/ml/evaluation/object_detection.py +11 -5
  7. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/tools/timers.py +5 -0
  8. sciveo-0.1.84/sciveo/version.py +2 -0
  9. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo.egg-info/PKG-INFO +1 -1
  10. sciveo-0.1.82/sciveo/version.py +0 -2
  11. {sciveo-0.1.82 → sciveo-0.1.84}/README.md +0 -0
  12. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/__init__.py +0 -0
  13. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/api/__init__.py +0 -0
  14. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/api/base.py +0 -0
  15. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/api/predictors.py +0 -0
  16. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/api/server.py +0 -0
  17. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/api/upload.py +0 -0
  18. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/cli.py +0 -0
  19. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/common/__init__.py +0 -0
  20. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/common/configuration.py +0 -0
  21. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/common/model.py +0 -0
  22. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/common/optimizers.py +0 -0
  23. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/common/sampling.py +0 -0
  24. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/content/__init__.py +0 -0
  25. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/content/dataset.py +0 -0
  26. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/content/experiment.py +0 -0
  27. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/content/project.py +0 -0
  28. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/content/runner.py +0 -0
  29. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/db/__init__.py +0 -0
  30. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/db/read_table.py +0 -0
  31. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/media/__init__.py +0 -0
  32. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/media/capture/__init__.py +0 -0
  33. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/media/capture/cam.py +0 -0
  34. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/media/capture/draw.py +0 -0
  35. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/media/capture/games/__init__.py +0 -0
  36. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/media/capture/games/asteroids/__init__.py +0 -0
  37. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/media/capture/games/asteroids/asteroid.py +0 -0
  38. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/media/capture/games/asteroids/base_move.py +0 -0
  39. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/media/capture/games/asteroids/circle.py +0 -0
  40. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/media/capture/games/asteroids/game.py +0 -0
  41. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/media/capture/games/asteroids/geometrics.py +0 -0
  42. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/media/capture/games/asteroids/gravity_ball.py +0 -0
  43. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/media/capture/games/asteroids/laser.py +0 -0
  44. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/media/capture/games/asteroids/rocket.py +0 -0
  45. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/media/capture/games/asteroids/space_asteroids.py +0 -0
  46. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/media/capture/games/asteroids/volume_bar.py +0 -0
  47. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/media/capture/motion_detection.py +0 -0
  48. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/media/capture/readers.py +0 -0
  49. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/media/ml/__init__.py +0 -0
  50. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/media/ml/base.py +0 -0
  51. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/media/ml/encoders/__init__.py +0 -0
  52. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/media/ml/encoders/base.py +0 -0
  53. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/media/ml/encoders/normalizer.py +0 -0
  54. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/media/ml/nlp/__init__.py +0 -0
  55. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/media/ml/nlp/search.py +0 -0
  56. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/media/ml/time_series/__init__.py +0 -0
  57. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/media/ml/time_series/dataset.py +0 -0
  58. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/media/ml/time_series/predictor.py +0 -0
  59. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/media/ml/time_series/trainer.py +0 -0
  60. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/media/ml/time_series/window_generator.py +0 -0
  61. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/media/pipelines/__init__.py +0 -0
  62. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/media/pipelines/base.py +0 -0
  63. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/media/pipelines/job_daemon.py +0 -0
  64. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/media/pipelines/layouts/__init__.py +0 -0
  65. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/media/pipelines/layouts/base.py +0 -0
  66. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/media/pipelines/pipeline.py +0 -0
  67. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/media/pipelines/postprocessors/__init__.py +0 -0
  68. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/media/pipelines/postprocessors/base.py +0 -0
  69. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/media/pipelines/postprocessors/default.py +0 -0
  70. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/media/pipelines/processors/__init__.py +0 -0
  71. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/media/pipelines/processors/audio/__init__.py +0 -0
  72. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/media/pipelines/processors/audio/audio.py +0 -0
  73. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/media/pipelines/processors/audio/audio_extractor_process.py +0 -0
  74. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/media/pipelines/processors/aws.py +0 -0
  75. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/media/pipelines/processors/base.py +0 -0
  76. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/media/pipelines/processors/file/__init__.py +0 -0
  77. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/media/pipelines/processors/file/archive.py +0 -0
  78. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/media/pipelines/processors/image/__init__.py +0 -0
  79. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/media/pipelines/processors/image/album.py +0 -0
  80. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/media/pipelines/processors/image/album_in_image.py +0 -0
  81. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/media/pipelines/processors/image/depth_esimation.py +0 -0
  82. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/media/pipelines/processors/image/embeddings.py +0 -0
  83. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/media/pipelines/processors/image/filters.py +0 -0
  84. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/media/pipelines/processors/image/generators.py +0 -0
  85. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/media/pipelines/processors/image/histogram.py +0 -0
  86. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/media/pipelines/processors/image/mask.py +0 -0
  87. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/media/pipelines/processors/image/object_detection.py +0 -0
  88. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/media/pipelines/processors/image/resize.py +0 -0
  89. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/media/pipelines/processors/image/segmentation.py +0 -0
  90. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/media/pipelines/processors/image/watermark.py +0 -0
  91. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/media/pipelines/processors/media_info.py +0 -0
  92. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/media/pipelines/processors/nlp/__init__.py +0 -0
  93. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/media/pipelines/processors/nlp/address.py +0 -0
  94. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/media/pipelines/processors/qr.py +0 -0
  95. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/media/pipelines/processors/sci/__init__.py +0 -0
  96. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/media/pipelines/processors/sci/base.py +0 -0
  97. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/media/pipelines/processors/sci/dataset.py +0 -0
  98. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/media/pipelines/processors/sci/time_series/__init__.py +0 -0
  99. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/media/pipelines/processors/sci/time_series/predictor.py +0 -0
  100. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/media/pipelines/processors/sci/time_series/trainer.py +0 -0
  101. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/media/pipelines/processors/tpu_base.py +0 -0
  102. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/media/pipelines/processors/video/__init__.py +0 -0
  103. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/media/pipelines/processors/video/generators.py +0 -0
  104. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/media/pipelines/processors/video/motion_detection.py +0 -0
  105. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/media/pipelines/processors/video/resize.py +0 -0
  106. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/media/pipelines/processors/video/video_album.py +0 -0
  107. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/media/pipelines/processors/video/video_frames.py +0 -0
  108. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/media/pipelines/processors/video/video_resample.py +0 -0
  109. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/media/pipelines/queues.py +0 -0
  110. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/media/pipelines/server.py +0 -0
  111. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/media/pipelines/web/__init__.py +0 -0
  112. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/media/pipelines/web/server.py +0 -0
  113. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/media/tools/__init__.py +0 -0
  114. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/media/tools/video_interactive.py +0 -0
  115. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/ml/__init__.py +0 -0
  116. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/ml/base.py +0 -0
  117. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/ml/dataset/__init__.py +0 -0
  118. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/ml/dataset/object_detection.py +0 -0
  119. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/ml/evaluation/__init__.py +0 -0
  120. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/ml/evaluation/markdown.py +0 -0
  121. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/ml/images/__init__.py +0 -0
  122. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/ml/images/base.py +0 -0
  123. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/ml/images/description.py +0 -0
  124. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/ml/images/embeddings.py +0 -0
  125. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/ml/images/object_detection.py +0 -0
  126. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/ml/images/tools.py +0 -0
  127. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/ml/images/transformers.py +0 -0
  128. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/ml/nlp/__init__.py +0 -0
  129. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/ml/nlp/embeddings.py +0 -0
  130. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/ml/nlp/tokenizers/__init__.py +0 -0
  131. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/ml/nlp/tokenizers/bpe.py +0 -0
  132. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/ml/video/__init__.py +0 -0
  133. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/ml/video/description.py +0 -0
  134. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/monitoring/__init__.py +0 -0
  135. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/monitoring/monitor.py +0 -0
  136. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/monitoring/power/__init__.py +0 -0
  137. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/monitoring/power/ems300.py +0 -0
  138. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/monitoring/power/sim.py +0 -0
  139. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/monitoring/power/tools.py +0 -0
  140. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/monitoring/start.py +0 -0
  141. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/monitoring/watchdog/__init__.py +0 -0
  142. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/monitoring/watchdog/base.py +0 -0
  143. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/monitoring/watchdog/process.py +0 -0
  144. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/network/__init__.py +0 -0
  145. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/network/camera.py +0 -0
  146. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/network/sniffer.py +0 -0
  147. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/network/tools.py +0 -0
  148. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/tools/__init__.py +0 -0
  149. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/tools/array.py +0 -0
  150. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/tools/aws/__init__.py +0 -0
  151. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/tools/aws/priority_queue.py +0 -0
  152. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/tools/aws/s3.py +0 -0
  153. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/tools/common.py +0 -0
  154. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/tools/complexity.py +0 -0
  155. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/tools/compress.py +0 -0
  156. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/tools/configuration.py +0 -0
  157. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/tools/crypto.py +0 -0
  158. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/tools/daemon.py +0 -0
  159. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/tools/draw/__init__.py +0 -0
  160. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/tools/draw/contours.py +0 -0
  161. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/tools/formating.py +0 -0
  162. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/tools/hardware.py +0 -0
  163. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/tools/http.py +0 -0
  164. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/tools/logger.py +0 -0
  165. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/tools/os.py +0 -0
  166. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/tools/queue.py +0 -0
  167. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/tools/random.py +0 -0
  168. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/tools/remote.py +0 -0
  169. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/tools/simple_counter.py +0 -0
  170. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/tools/synchronized.py +0 -0
  171. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/tools/totp.py +0 -0
  172. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/web/__init__.py +0 -0
  173. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo/web/common.py +0 -0
  174. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo.egg-info/SOURCES.txt +0 -0
  175. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo.egg-info/dependency_links.txt +0 -0
  176. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo.egg-info/entry_points.txt +0 -0
  177. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo.egg-info/requires.txt +0 -0
  178. {sciveo-0.1.82 → sciveo-0.1.84}/sciveo.egg-info/top_level.txt +0 -0
  179. {sciveo-0.1.82 → sciveo-0.1.84}/setup.cfg +0 -0
  180. {sciveo-0.1.82 → sciveo-0.1.84}/setup.py +0 -0
  181. {sciveo-0.1.82 → sciveo-0.1.84}/test/test_complexity.py +0 -0
  182. {sciveo-0.1.82 → sciveo-0.1.84}/test/test_compress.py +0 -0
  183. {sciveo-0.1.82 → sciveo-0.1.84}/test/test_configuration.py +0 -0
  184. {sciveo-0.1.82 → sciveo-0.1.84}/test/test_crypto.py +0 -0
  185. {sciveo-0.1.82 → sciveo-0.1.84}/test/test_eval_markdown.py +0 -0
  186. {sciveo-0.1.82 → sciveo-0.1.84}/test/test_ml_datasets.py +0 -0
  187. {sciveo-0.1.82 → sciveo-0.1.84}/test/test_monitoring.py +0 -0
  188. {sciveo-0.1.82 → sciveo-0.1.84}/test/test_runner.py +0 -0
  189. {sciveo-0.1.82 → sciveo-0.1.84}/test/test_sampling.py +0 -0
  190. {sciveo-0.1.82 → sciveo-0.1.84}/test/test_tokenizers.py +0 -0
  191. {sciveo-0.1.82 → sciveo-0.1.84}/test/test_totp.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: sciveo
3
- Version: 0.1.82
3
+ Version: 0.1.84
4
4
  Description-Content-Type: text/markdown
5
5
  Provides-Extra: mon
6
6
  Provides-Extra: net
@@ -38,9 +38,11 @@ class RTSPFactoryBase(GstRtspServer.RTSPMediaFactory):
38
38
  f"appsrc name={self.appsrc_name} is-live=true block=true format=time "
39
39
  f"caps=video/x-raw,format=BGR,width={self.width},height={self.height},framerate={self.fps}/1 "
40
40
  "! videoconvert "
41
- "! x264enc tune=zerolatency speed-preset=ultrafast "
41
+ "! video/x-raw,format=I420 "
42
+ "! x264enc tune=zerolatency speed-preset=ultrafast key-int-max=30 "
42
43
  "! rtph264pay config-interval=1 name=pay0 pt=96"
43
44
  )
45
+ info("GST Pipeline", pipeline_str)
44
46
  return Gst.parse_launch(pipeline_str)
45
47
 
46
48
  def do_configure(self, rtsp_media):
@@ -50,13 +52,16 @@ class RTSPFactoryBase(GstRtspServer.RTSPMediaFactory):
50
52
 
51
53
  def on_need_data(self, src, length):
52
54
  frame = self.next_frame()
55
+ frame = np.ascontiguousarray(frame, dtype=np.uint8)
53
56
 
54
57
  data = frame.tobytes()
55
58
  buf = Gst.Buffer.new_allocate(None, len(data), None)
56
59
  buf.fill(0, data)
60
+
57
61
  buf.duration = Gst.SECOND // self.fps
58
62
  buf.pts = buf.dts = self.timestamp
59
63
  self.timestamp += buf.duration
64
+
60
65
  src.emit("push-buffer", buf)
61
66
 
62
67
  def next_frame(self):
@@ -141,12 +146,20 @@ class CamFactory(ColorBarFactory):
141
146
  self.cam = CameraDaemon(cam_id=self.cam_id)
142
147
 
143
148
  def next_frame(self):
144
- frame = self.cam.read()
149
+ try:
150
+ frame = self.cam.read()
151
+ except Exception as e:
152
+ exception(e, "CAM frame read FAIL")
153
+ frame = None
154
+
145
155
  if frame is None:
146
156
  frame = super().next_frame()
147
157
 
148
- for k, v in self.configuration.get("draw", {}).items():
149
- self.list_draw_processors.get(k, DrawNone())(frame, v)
158
+ try:
159
+ for k, v in self.configuration.get("draw", {}).items():
160
+ self.list_draw_processors.get(k, DrawNone())(frame, v)
161
+ except Exception as e:
162
+ exception(e, "DRAW FAIL")
150
163
 
151
164
  self.fps_next_frame.update()
152
165
 
@@ -22,6 +22,7 @@ from sciveo.tools.logger import *
22
22
  from sciveo.tools.daemon import DaemonBase
23
23
  from sciveo.tools.queue import TouchedFilePathQueue
24
24
  from sciveo.tools.simple_counter import RunCounter
25
+ from sciveo.tools.timers import FPSCounter
25
26
  from sciveo.media.capture.motion_detection import MotionDetectorDaemon
26
27
 
27
28
 
@@ -205,13 +206,16 @@ class RTSPVideoPlayer:
205
206
  self.name = name
206
207
  self.cap = None
207
208
  self.is_running = False
209
+ self.fps = FPSCounter(period=10, tag=f"{name}", printer=info, round_value=1)
208
210
 
209
211
  def open(self):
210
- info("Opening RTSP", self.rtsp_url)
212
+ info("Opening...", self.rtsp_url)
211
213
  self.cap = cv2.VideoCapture(self.rtsp_url)
212
214
  if not self.cap.isOpened():
213
215
  error("Failed to open RTSP URL", self.rtsp_url)
214
216
  self.cap = None
217
+ else:
218
+ info("Opened", self.rtsp_url)
215
219
 
216
220
  def close(self):
217
221
  if self.cap:
@@ -250,6 +254,7 @@ class RTSPVideoPlayer:
250
254
  info("Quit key pressed, stopping player")
251
255
  self.close()
252
256
  self.is_running = False
257
+ self.fps.update()
253
258
 
254
259
  def finalise(self):
255
260
  self.close()
@@ -46,10 +46,13 @@ class RPICamera(CameraDaemon):
46
46
  self.picam2.stop()
47
47
 
48
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
49
+ try:
50
+ frame = self.picam2.capture_array()
51
+ cv2.cvtColor(frame, cv2.COLOR_RGB2BGR)
52
+ with self.lock_frame:
53
+ self.frame = frame
54
+ except Exception as e:
55
+ exception(e, "CAM frame read FAIL")
53
56
 
54
57
 
55
58
  class RPICameraFactory(CamFactory):
@@ -12,6 +12,7 @@
12
12
  import time
13
13
  import cv2
14
14
 
15
+ from sciveo.tools.timers import FPSCounter
15
16
  from sciveo.tools.logger import *
16
17
 
17
18
 
@@ -23,13 +24,16 @@ class RTSPVideoPlayer:
23
24
  self.name = name
24
25
  self.cap = None
25
26
  self.is_running = False
27
+ self.fps = FPSCounter(period=10, tag=f"{name}", printer=info, round_value=1)
26
28
 
27
29
  def open(self):
28
- info("Opening RTSP", self.rtsp_url)
30
+ info("Opening...", self.rtsp_url)
29
31
  self.cap = cv2.VideoCapture(self.rtsp_url)
30
32
  if not self.cap.isOpened():
31
33
  error("Failed to open RTSP URL", self.rtsp_url)
32
34
  self.cap = None
35
+ else:
36
+ info("Opened", self.rtsp_url)
33
37
 
34
38
  def close(self):
35
39
  if self.cap:
@@ -68,6 +72,7 @@ class RTSPVideoPlayer:
68
72
  info("Quit key pressed, stopping player")
69
73
  self.close()
70
74
  self.is_running = False
75
+ self.fps.update()
71
76
 
72
77
  def finalise(self):
73
78
  self.close()
@@ -105,7 +105,6 @@ class EvalObjectDetection:
105
105
  count_labels = 0
106
106
  true_positives = []
107
107
  false_positives = []
108
- detected = []
109
108
 
110
109
  for i, prediction in enumerate(self.converted_predictions):
111
110
  current_predictions = prediction.get(class_name, [])
@@ -113,6 +112,8 @@ class EvalObjectDetection:
113
112
 
114
113
  count_labels += len(current_labels)
115
114
 
115
+ detected = set()
116
+
116
117
  for prediction_box in current_predictions:
117
118
  if prediction_box[4] < confidence_threshold:
118
119
  continue
@@ -126,10 +127,12 @@ class EvalObjectDetection:
126
127
  max_iou = iou
127
128
  gt_match = label_box
128
129
 
129
- if gt_match is not None and gt_match not in detected:
130
+ gt_match_key = tuple([round(x, 6) for x in gt_match]) if gt_match is not None else None
131
+
132
+ if gt_match is not None and gt_match_key not in detected:
130
133
  true_positives.append(1)
131
134
  false_positives.append(0)
132
- detected.append(gt_match)
135
+ detected.add(gt_match_key)
133
136
  else:
134
137
  true_positives.append(0)
135
138
  false_positives.append(1)
@@ -143,7 +146,8 @@ class EvalObjectDetection:
143
146
  FP = np.sum(false_positives) / (count_labels + 1e-20)
144
147
 
145
148
  # Compute AP using the trapezoidal rule (integrating precision over recall)
146
- ap = np.trapz(precision, recall)
149
+ order = np.argsort(recall)
150
+ ap = np.trapezoid(precision[order], recall[order])
147
151
  return ap, FP
148
152
 
149
153
  # TODO: Use simple gradient-based threshold optimisation instead of current grid search.
@@ -199,13 +203,15 @@ class EvalObjectDetection:
199
203
 
200
204
  def evaluate(self, confidence_thresholds={"default": 0.0}):
201
205
  """
202
- Calculate metrics like mAP based on IoU.
206
+ Non-classical AP-related FP-constrained AP@IoU=0.5 calculation
203
207
  """
204
208
 
205
209
  aps = []
206
210
  class_ap = {}
207
211
  class_FP = {}
208
212
 
213
+ info("Evaluating non-classical FP-constrained AP@IoU=0.5")
214
+
209
215
  for class_name in self.class_names:
210
216
  ap, FP = self.compute_ap(class_name, confidence_thresholds.get(class_name, confidence_thresholds["default"]))
211
217
  aps.append(ap)
@@ -43,6 +43,11 @@ class FPSCounter:
43
43
  self.t1 = time.time()
44
44
  self.print()
45
45
 
46
+ def reset(self):
47
+ self.n = 0
48
+ self.t1 = time.time()
49
+ self.value = 0
50
+
46
51
 
47
52
  class TimerExec:
48
53
  def __init__(self, fn, period=1.0):
@@ -0,0 +1,2 @@
1
+
2
+ __version__ = '0.1.84'
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: sciveo
3
- Version: 0.1.82
3
+ Version: 0.1.84
4
4
  Description-Content-Type: text/markdown
5
5
  Provides-Extra: mon
6
6
  Provides-Extra: net
@@ -1,2 +0,0 @@
1
-
2
- __version__ = '0.1.82'
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