Update
This commit is contained in:
parent
5c3106935d
commit
0adf8c0841
@ -7,6 +7,9 @@ import logging
|
||||
import platform
|
||||
import math
|
||||
|
||||
import os
|
||||
import psutil
|
||||
|
||||
logging.basicConfig(level='INFO')
|
||||
|
||||
@dataclass
|
||||
@ -51,6 +54,10 @@ class VideoStream:
|
||||
def update(self):
|
||||
while self.running:
|
||||
success, frame = self.stream.read()
|
||||
if not success:
|
||||
current_system_pid = os.getpid()
|
||||
ThisSystem = psutil.Process(current_system_pid)
|
||||
ThisSystem.terminate()
|
||||
assert success
|
||||
self.buffer = frame
|
||||
self.stream.release()
|
||||
|
||||
@ -6,6 +6,8 @@ import sys
|
||||
import threading
|
||||
import time
|
||||
from queue import Queue
|
||||
import os
|
||||
import psutil
|
||||
|
||||
import flask
|
||||
from flask import jsonify, request
|
||||
|
||||
@ -7,6 +7,9 @@ import platform
|
||||
import math
|
||||
from dataclasses import dataclass
|
||||
|
||||
import os
|
||||
import psutil
|
||||
|
||||
logging.basicConfig(level='DEBUG')
|
||||
|
||||
class CUDA:
|
||||
@ -54,6 +57,10 @@ class VideoStream:
|
||||
def update(self):
|
||||
while self.running:
|
||||
success, frame = self.stream.read()
|
||||
if not success:
|
||||
current_system_pid = os.getpid()
|
||||
ThisSystem = psutil.Process(current_system_pid)
|
||||
ThisSystem.terminate()
|
||||
assert success
|
||||
self.buffer = frame
|
||||
self.stream.release()
|
||||
|
||||
@ -5,6 +5,9 @@ import platform
|
||||
import time
|
||||
from dataclasses import dataclass
|
||||
|
||||
import os
|
||||
import psutil
|
||||
|
||||
import cv2
|
||||
|
||||
import apriltag_detector
|
||||
|
||||
Loading…
Reference in New Issue
Block a user