OPENCV_FFMPEG_READ_ATTEMPTS
parent
951b2f362a
commit
95dda6ad25
|
@ -12,6 +12,7 @@ services:
|
||||||
runtime: nvidia
|
runtime: nvidia
|
||||||
environment:
|
environment:
|
||||||
NVIDIA_VISIBLE_DEVICES: all
|
NVIDIA_VISIBLE_DEVICES: all
|
||||||
|
OPENCV_FFMPEG_READ_ATTEMPTS: 8192
|
||||||
logging:
|
logging:
|
||||||
driver: "json-file"
|
driver: "json-file"
|
||||||
options:
|
options:
|
||||||
|
|
|
@ -0,0 +1,28 @@
|
||||||
|
import cv2
|
||||||
|
import json
|
||||||
|
import time
|
||||||
|
import requests
|
||||||
|
import supervision as sv
|
||||||
|
|
||||||
|
from datetime import datetime
|
||||||
|
from ultralytics import YOLO
|
||||||
|
from flask import Flask,request,Response
|
||||||
|
from multiprocessing import Process, Event
|
||||||
|
|
||||||
|
app = Flask(__name__)
|
||||||
|
|
||||||
|
@app.route('/show',methods=['POST'])
|
||||||
|
def show():
|
||||||
|
# print(request.json)
|
||||||
|
data = request.json["content"]
|
||||||
|
balls = data["balls"]
|
||||||
|
table = data["table"]
|
||||||
|
text = f"table:{table:>3} "
|
||||||
|
for i in range(16):
|
||||||
|
ball = "#" if "ball"+str(i) in balls else " "
|
||||||
|
text += f"| {i} : {ball} "
|
||||||
|
print(datetime.now().strftime('%Y-%m-%d %H:%M:%S'),text)
|
||||||
|
return 'ok'
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
app.run("0.0.0.0",threaded=True)
|
Loading…
Reference in New Issue