Code Monkey home page Code Monkey logo

yolo2mqtt's People

Contributors

cobryan05 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

jlrgraham swissly

yolo2mqtt's Issues

Fresh install issues

Good Day,
I ran the following commands and have come up with some errors on vanilla install:

$ git clone --recursive https://github.com/cobryan05/Yolo2Mqtt.git
$ cd Yolo2Mqtt
Yolo2Mqtt$ docker build . -t yolo2mqtt
Yolo2Mqtt$ docker compose up

  1. docker-compose.yml references "mqtt2" in the depends_on: when it should be "mqtt":
    image

  2. I get the following errors:

root@docker:~/Yolo2Mqtt# docker compose up
[+] Building 0.0s (0/0) docker:default
[+] Running 2/0
โœ” Container mqtt Created 0.0s
โœ” Container yolo2mqtt Created 0.0s
Attaching to mqtt, yolo2mqtt
mqtt | 1696344583: mosquitto version 2.0.18 starting
mqtt | 1696344583: Config loaded from /mosquitto-no-auth.conf.
mqtt | 1696344583: Opening ipv4 listen socket on port 1883.
mqtt | 1696344583: Opening ipv6 listen socket on port 1883.
mqtt | 1696344583: mosquitto version 2.0.18 running
yolo2mqtt | 2023/10/03 09:49:44 INF MediaMTX v1.1.1
yolo2mqtt | 2023/10/03 09:49:44 WAR configuration file not found (looked in /app/rtsp-simple-server.yml, /app/mediamtx.yml, /usr/local/etc/mediamtx.yml, /usr/etc/mediamtx.yml, /etc/mediamtx/mediamtx.yml), using an empty configuration
yolo2mqtt | 2023/10/03 09:49:44 INF [RTSP] listener opened on :8554 (TCP), :8000 (UDP/RTP), :8001 (UDP/RTCP)
yolo2mqtt | 2023/10/03 09:49:44 INF [RTMP] listener opened on :1935
yolo2mqtt | 2023/10/03 09:49:44 INF [HLS] listener opened on :8888
yolo2mqtt | 2023/10/03 09:49:44 INF [WebRTC] listener opened on :8889 (HTTP)
yolo2mqtt | 2023/10/03 09:49:44 INF [SRT] listener opened on :8890 (UDP)
yolo2mqtt | 2023/10/03 09:49:44 INF [API] listener opened on 0.0.0.0:9997
yolo2mqtt | Traceback (most recent call last):
yolo2mqtt | File "/app/interactionTracker.py", line 3, in
yolo2mqtt | import cv2
yolo2mqtt | File "/home/user/miniconda/lib/python3.9/site-packages/cv2/init.py", line 190, in
yolo2mqtt | bootstrap()
yolo2mqtt | File "/home/user/miniconda/lib/python3.9/site-packages/cv2/init.py", line 184, in bootstrap
yolo2mqtt | if __load_extra_py_code_for_module("cv2", submodule, DEBUG):
yolo2mqtt | File "/home/user/miniconda/lib/python3.9/site-packages/cv2/init.py", line 37, in __load_extra_py_code_for_module
yolo2mqtt | py_module = importlib.import_module(module_name)
yolo2mqtt | File "/home/user/miniconda/lib/python3.9/importlib/init.py", line 127, in import_module
yolo2mqtt | return _bootstrap._gcd_import(name[level:], package, level)
yolo2mqtt | File "/home/user/miniconda/lib/python3.9/site-packages/cv2/typing/init.py", line 69, in
yolo2mqtt | NumPyArrayGeneric = numpy.ndarray[typing.Any, numpy.dtype[numpy.generic]]
yolo2mqtt | TypeError: 'numpy._DTypeMeta' object is not subscriptable
yolo2mqtt | Traceback (most recent call last):
yolo2mqtt | File "/app/yolo2mqtt.py", line 21, in
yolo2mqtt | from trackerTools.yoloInference import YoloInference
yolo2mqtt | File "/app/submodules/trackerTools/yoloInference.py", line 3, in
yolo2mqtt | import cv2
yolo2mqtt | File "/home/user/miniconda/lib/python3.9/site-packages/cv2/init.py", line 190, in
yolo2mqtt | bootstrap()
yolo2mqtt | File "/home/user/miniconda/lib/python3.9/site-packages/cv2/init.py", line 184, in bootstrap
yolo2mqtt | if __load_extra_py_code_for_module("cv2", submodule, DEBUG):
yolo2mqtt | File "/home/user/miniconda/lib/python3.9/site-packages/cv2/init.py", line 37, in __load_extra_py_code_for_module
yolo2mqtt | py_module = importlib.import_module(module_name)
yolo2mqtt | File "/home/user/miniconda/lib/python3.9/importlib/init.py", line 127, in import_module
yolo2mqtt | return _bootstrap._gcd_import(name[level:], package, level)
yolo2mqtt | File "/home/user/miniconda/lib/python3.9/site-packages/cv2/typing/init.py", line 69, in
yolo2mqtt | NumPyArrayGeneric = numpy.ndarray[typing.Any, numpy.dtype[numpy.generic]]
yolo2mqtt | TypeError: 'numpy.DTypeMeta' object is not subscriptable
yolo2mqtt | DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): 0.0.0.0:9997
yolo2mqtt | DEBUG:urllib3.connectionpool:http://0.0.0.0:9997 "GET /v2/config/get HTTP/1.1" 200 1867
yolo2mqtt | DEBUG:rtspSimpleServer:{'logLevel': 'info', 'logDestinations': ['stdout'], 'logFile': 'mediamtx.log', 'readTimeout': '10s', 'writeTimeout': '10s', 'readBufferCount': 0, 'writeQueueSize': 512, 'udpMaxPayloadSize': 1472, 'externalAuthenticationURL': '', 'api': True, 'apiAddress': '0.0.0.0:9997', 'metrics': False, 'metricsAddress': '127.0.0.1:9998', 'pprof': False, 'pprofAddress': '127.0.0.1:9999', 'runOnConnect': '', 'runOnConnectRestart': False, 'runOnDisconnect': '', 'rtsp': True, 'rtspDisable': False, 'protocols': ['multicast', 'tcp', 'udp'], 'encryption': 'no', 'rtspAddress': ':8554', 'rtspsAddress': ':8322', 'rtpAddress': ':8000', 'rtcpAddress': ':8001', 'multicastIPRange': '224.1.0.0/16', 'multicastRTPPort': 8002, 'multicastRTCPPort': 8003, 'serverKey': 'server.key', 'serverCert': 'server.crt', 'authMethods': ['basic'], 'rtmp': True, 'rtmpDisable': False, 'rtmpAddress': ':1935', 'rtmpEncryption': 'no', 'rtmpsAddress': ':1936', 'rtmpServerKey': 'server.key', 'rtmpServerCert': 'server.crt', 'hls': True, 'hlsDisable': False, 'hlsAddress': ':8888', 'hlsEncryption': False, 'hlsServerKey': 'server.key', 'hlsServerCert': 'server.crt', 'hlsAlwaysRemux': False, 'hlsVariant': 'lowLatency', 'hlsSegmentCount': 7, 'hlsSegmentDuration': '1s', 'hlsPartDuration': '200ms', 'hlsSegmentMaxSize': '50M', 'hlsAllowOrigin': '', 'hlsTrustedProxies': [], 'hlsDirectory': '', 'webrtc': True, 'webrtcDisable': False, 'webrtcAddress': ':8889', 'webrtcEncryption': False, 'webrtcServerKey': 'server.key', 'webrtcServerCert': 'server.crt', 'webrtcAllowOrigin': '', 'webrtcTrustedProxies': [], 'webrtcICEServers': None, 'webrtcICEServers2': [{'url': 'stun:stun.l.google.com:19302', 'username': '', 'password': ''}], 'webrtcICEHostNAT1To1IPs': [], 'webrtcICEUDPMuxAddress': '', 'webrtcICETCPMuxAddress': '', 'srt': True, 'srtAddress': ':8890', 'record': False, 'recordPath': './recordings/%path/%Y-%m-%d
%H-%M-%S-%f', 'recordFormat': 'fmp4', 'recordPartDuration': '100ms', 'recordSegmentDuration': '1h0m0s', 'recordDeleteAfter': '24h0m0s', 'paths': {}}
yolo2mqtt | Traceback (most recent call last):
yolo2mqtt | File "/app/recordingManager.py", line 236, in
yolo2mqtt | recManager = RecordingManager(parseArgs())
yolo2mqtt | File "/app/recordingManager.py", line 137, in init
yolo2mqtt | self._mediaManager = MediaManager(recSettings.mediaRoot, daysToKeep=recSettings.keepVideosDays)
yolo2mqtt | File "/app/src/mediaManager.py", line 38, in init
yolo2mqtt | os.makedirs(self.videoPath, exist_ok=True)
yolo2mqtt | File "/home/user/miniconda/lib/python3.9/os.py", line 225, in makedirs
yolo2mqtt | mkdir(name, mode)
yolo2mqtt | PermissionError: [Errno 13] Permission denied: '/media/video'
yolo2mqtt | Exception ignored in: <function MediaManager.del at 0x7f0e497ed550>
yolo2mqtt | Traceback (most recent call last):
yolo2mqtt | File "/app/src/mediaManager.py", line 45, in del
yolo2mqtt | if self._clearMediaTimer:
yolo2mqtt | AttributeError: 'MediaManager' object has no attribute '_clearMediaTimer'

Can't get attribute 'DetectionModel'

yolo2mqtt | ERROR:Worker_driveway:Failed to load model [/config/yolov5m.pt]: Can't get attribute 'DetectionModel' on <module 'models.yolo' from '/app/submodules/yolov5/models/yolo.py'>

I am able to run my model from yolov5 detect.py

P.S. I had to change depends_on: to mqtt from mqtt2 in the original.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.