汕头网站制作流程,国家建设局,企业做网站的钱怎么做账,如归网络营销推广企业综合视觉分析系统
技术栈#xff1a;
YOLOv8#xff1a;用于目标检测#xff0c;是一个快速且准确的目标检测框架。DeepSORT#xff1a;用于目标跟踪#xff0c;结合了深度学习特征提取和卡尔曼滤波器来预测目标轨迹。GUI#xff1a;提供一个直观易用的图形用户界面
YOLOv8用于目标检测是一个快速且准确的目标检测框架。DeepSORT用于目标跟踪结合了深度学习特征提取和卡尔曼滤波器来预测目标轨迹。GUI提供一个直观易用的图形用户界面使得非技术用户也能方便地使用该系统。语义分割通过YOLOv8或其他语义分割算法可以区分图像中的不同区域或对象并赋予它们特定的标签。姿态识别利用深度学习模型来识别物体或人体的姿态如关键点的位置等。
功能描述
目标检测与分类系统能够识别视频或图像中的特定对象并对其进行分类。目标跟踪使用DeepSORT算法可以在连续的视频帧中持续跟踪已识别的对象。语义分割系统不仅限于检测对象边界框还能区分图像的不同部分例如船只及其背景。姿态识别能够识别目标对象的姿态对于人形目标来说可以检测出肢体的关键点位置对于其他类型的目标则可以根据应用场景定制姿态识别功能。实时展示与交互通过GUI用户可以实时查看处理结果并与系统进行交互比如调整参数、保存结果等。
应用场景
安全监控在机场、车站等人流密集场所帮助识别异常行为或可疑人物。智能交通管理监控道路情况识别车辆、行人等并进行交通流量管理。工业自动化在生产线上用于质量控制识别产品缺陷。无人机监控在海上或空中用于船只或飞行物的自动识别与跟踪。
优势
高效性由于采用了先进的深度学习模型系统能够以较高的帧率处理视频数据。准确性通过优化后的模型系统能更准确地区分不同的对象和背景。易用性图形用户界面使得配置和操作变得简单降低了用户的使用门槛。
这样的系统可以为多种行业提供强大的视觉分析能力具有广泛的应用前景。
姿态识别 关键代码
main.py
from src.qt.stream.video_capture import CameraCaptureThread
from src.qt.stream.visualize import VideoVisualizationThread
from src.qt.stream.ai_worker import AiWorkerThread
from src.ui.main_window import Ui_MainWindow
from src.qt.video.video_worker import FileProcessThread
from PyQt5 import QtGui, QtWidgets
from PyQt5.QtCore import Qt
import sys
import numpy as np
import cv2 as cvclass MainWindow(QtWidgets.QMainWindow, Ui_MainWindow):def __init__(self, parentNone):super(MainWindow, self).__init__(parent)self.setupUi(self)self.ai_thread AiWorkerThread()self.camera_thread CameraCaptureThread()self.display_thread VideoVisualizationThread()self.file_process_thread FileProcessThread()self.conf_thr 0.3self.iou_thr 0.45self.frame_interval 0self.model_name yolov8nself.ai_task object_detectionself.tracker_name deepsortself.init_slots()self.buttons_states(waiting_for_setting)def init_slots(self):self.radioButton_det.toggled.connect(lambda: self.get_ai_task(self.radioButton_det))self.radioButton_pose.toggled.connect(lambda: self.get_ai_task(self.radioButton_pose))self.radioButton_seg.toggled.connect(lambda: self.get_ai_task(self.radioButton_seg))self.doubleSpinBox_conf.valueChanged.connect(lambda x: self.update_parameter(x, doubleSpinBox_conf))self.doubleSpinBox_interval.valueChanged.connect(lambda x: self.update_parameter(x, doubleSpinBox_interval))self.doubleSpinBox_iou.valueChanged.connect(lambda x: self.update_parameter(x, doubleSpinBox_iou))self.horizontalSlider_conf.valueChanged.connect(lambda x: self.update_parameter(x, horizontalSlider_conf))self.horizontalSlider_interval.valueChanged.connect(lambda x: self.update_parameter(x, horizontalSlider_interval))self.horizontalSlider_iou.valueChanged.connect(lambda x: self.update_parameter(x, horizontalSlider_iou))self.comboBox_model.currentTextChanged.connect(self.choose_model)self.comboBox_tracker.currentTextChanged.connect(self.choose_tracker)self.pushButton_cam.clicked.connect(self.process_camera)self.pushButton_file.clicked.connect(self.process_file)self.pushButton_stop.clicked.connect(self.stop_video)self.pushButton_play.clicked.connect(self.file_process_thread.toggle_play_pause)def resizeEvent(self, event:QtGui.QResizeEvent):self.screen_size (self.label_display.width(), self.label_display.height())self.display_thread.get_screen_size(self.screen_size)self.file_process_thread.get_screen_size(self.screen_size)QtWidgets.QMainWindow.resizeEvent(self, event)def update_parameter(self, x, flag):if flag doubleSpinBox_conf:self.horizontalSlider_conf.setValue(int(x*100))self.conf_thr float(x)elif flag doubleSpinBox_interval:self.horizontalSlider_interval.setValue(int(x))self.frame_interval int(x)self.file_process_thread.set_frame_interval(self.frame_interval)elif flag doubleSpinBox_iou:self.horizontalSlider_iou.setValue(int(x*100))self.iou_thr float(x)elif flag horizontalSlider_conf:self.doubleSpinBox_conf.setValue(x/100)self.conf_thr float(x/100)elif flag horizontalSlider_interval:self.doubleSpinBox_interval.setValue(x)self.frame_interval int(x)self.file_process_thread.set_frame_interval(self.frame_interval)elif flag horizontalSlider_iou:self.doubleSpinBox_iou.setValue(x/100)self.iou_thr float(x/100)if self.ai_thread.isRunning:self.ai_thread.set_confidence_threshold(self.conf_thr)self.ai_thread.set_iou_threshold(self.iou_thr)if self.file_process_thread.isRunning:self.file_process_thread.set_confidence_threshold(self.conf_thr)self.file_process_thread.set_iou_threshold(self.iou_thr)def get_ai_task(self, btn):if btn.text() Detection:if btn.isChecked() True:self.ai_task object_detectionelif btn.text() Pose Estimation:if btn.isChecked() True:self.ai_task pose_detectionelif btn.text() Segmentation:if btn.isChecked() True:self.ai_task segmentationdef choose_model(self):self.model_name self.comboBox_model.currentText()self.model_name self.model_name.lower()def choose_tracker(self):self.tracker_name self.comboBox_tracker.currentText()self.tracker_name self.tracker_name.lower()def buttons_states(self, work_state):if work_state waiting_for_setting:self.radioButton_det.setDisabled(False)self.radioButton_pose.setDisabled(False)self.radioButton_seg.setDisabled(False)self.comboBox_model.setDisabled(False)self.comboBox_tracker.setDisabled(False)self.pushButton_cam.setDisabled(False)self.pushButton_file.setDisabled(False)self.pushButton_play.setDisabled(True)self.pushButton_stop.setDisabled(True)self.doubleSpinBox_conf.setDisabled(False)self.horizontalSlider_conf.setDisabled(False)self.doubleSpinBox_interval.setDisabled(False)self.horizontalSlider_interval.setDisabled(False)self.doubleSpinBox_iou.setDisabled(False)self.horizontalSlider_iou.setDisabled(False)self.doubleSpinBox_interval.setDisabled(False)self.horizontalSlider_interval.setDisabled(False)elif work_state processing_on_camera:self.pushButton_play.clickself.radioButton_det.setDisabled(True)self.radioButton_pose.setDisabled(True)self.radioButton_seg.setDisabled(True)self.comboBox_model.setDisabled(True)self.comboBox_tracker.setDisabled(True)self.pushButton_cam.setDisabled(True)self.pushButton_file.setDisabled(True)self.pushButton_play.setDisabled(True)self.pushButton_stop.setDisabled(False)self.doubleSpinBox_conf.setDisabled(False)self.horizontalSlider_conf.setDisabled(False)self.doubleSpinBox_interval.setDisabled(True)self.horizontalSlider_interval.setDisabled(False)self.doubleSpinBox_iou.setDisabled(False)self.horizontalSlider_iou.setDisabled(False)self.doubleSpinBox_interval.setDisabled(True)self.horizontalSlider_interval.setDisabled(True)elif work_state processing_on_file:self.radioButton_det.setDisabled(True)self.radioButton_pose.setDisabled(True)self.radioButton_seg.setDisabled(True)self.comboBox_model.setDisabled(True)self.comboBox_tracker.setDisabled(True)self.pushButton_cam.setDisabled(True)self.pushButton_file.setDisabled(True)self.pushButton_play.setDisabled(False)self.pushButton_stop.setDisabled(False)self.doubleSpinBox_conf.setDisabled(False)self.horizontalSlider_conf.setDisabled(False)self.doubleSpinBox_interval.setDisabled(False)self.horizontalSlider_interval.setDisabled(False)self.doubleSpinBox_iou.setDisabled(False)self.horizontalSlider_iou.setDisabled(False)self.doubleSpinBox_interval.setDisabled(False)self.horizontalSlider_interval.setDisabled(False)def process_camera(self):video_source self.get_stream_source()print(SOURCE, video_source)if video_source is not None:self.ai_thread.set_start_config(ai_taskself.ai_task,model_nameself.model_name,tracker_nameself.tracker_name)self.camera_thread.set_start_config(video_sourcevideo_source)self.display_thread.set_start_config([self.label_display.width(),self.label_display.height()])self.camera_thread.send_frame.connect(self.display_thread.get_fresh_frame)self.camera_thread.send_frame.connect(self.ai_thread.get_frame)self.ai_thread.send_ai_output.connect(self.display_thread.get_ai_output)self.display_thread.send_displayable_frame.connect(self.update_display_frame)self.display_thread.send_ai_output.connect(self.update_statistic_table)self.display_thread.send_thread_start_stop_flag.connect(self.buttons_states)self.ai_thread.start()self.display_thread.start()self.camera_thread.start()def process_file(self):img_fm (.tif, .tiff, .jpg, .jpeg, .gif, .png, .eps, .raw, .cr2, .nef, .orf, .sr2, .bmp, .ppm, .heif)vid_fm (.flv, .avi, .mp4, .3gp, .mov, .webm, .ogg, .qt, .avchd)file_list *.join(img_fmvid_fm)file_name, _ QtWidgets.QFileDialog.getOpenFileName(self, choose an image or video file, ./data, fFiles({file_list}))if file_name:self.file_process_thread.set_start_config(video_pathfile_name,ai_taskself.ai_task,screen_size[self.label_display.width(),self.label_display.height()],model_nameself.model_name,tracker_nameself.tracker_name,confidence_thresholdself.conf_thr,iou_thresholdself.iou_thr,frame_intervalself.frame_interval)self.file_process_thread.send_ai_output.connect(self.update_statistic_table)self.file_process_thread.send_display_frame.connect(self.update_display_frame)self.file_process_thread.send_play_progress.connect(self.progressBar_play.setValue)self.file_process_thread.send_thread_start_finish_flag.connect(self.buttons_states)self.file_process_thread.start()def stop_video(self):self.display_thread.stop_display()self.ai_thread.stop_process()self.camera_thread.stop_capture()self.file_process_thread.stop_process()def update_display_frame(self, showImage):self.label_display.setPixmap(QtGui.QPixmap.fromImage(showImage))def clean_table(self):while (self.tableWidget_results.rowCount() 0):self.tableWidget_results.removeRow(0)def update_statistic_table(self, ai_output):self.clean_table()self.tableWidget_results.setRowCount(0)if ai_output []:returnfor box in ai_output:each_item [str(box[id]),str(box[class]), {:.1f}%.format(box[confidence]*100), str(box[bbox])]row self.tableWidget_results.rowCount()self.tableWidget_results.insertRow(row)for j in range(len(each_item)):item QtWidgets.QTableWidgetItem(str(each_item[j]))item.setTextAlignment(Qt.AlignHCenter | Qt.AlignVCenter)self.tableWidget_results.setItem(row, j, item)def get_stream_source(self):video_source, okPressed QtWidgets.QInputDialog.getText(self, Input Camera_ID or RTSP, Camera ID or RTSP)if okPressed:if video_source.isdigit():return int(video_source)else:return video_sourceelse:return Noneif __name__ __main__:app QtWidgets.QApplication(sys.argv)mainWindow MainWindow()mainWindow.show()sys.exit(app.exec_()) 目标检测 语义分割 文章转载自: http://www.morning.qllcp.cn.gov.cn.qllcp.cn http://www.morning.27asw.cn.gov.cn.27asw.cn http://www.morning.lhhkp.cn.gov.cn.lhhkp.cn http://www.morning.hfxks.cn.gov.cn.hfxks.cn http://www.morning.pjrql.cn.gov.cn.pjrql.cn http://www.morning.jwefry.cn.gov.cn.jwefry.cn http://www.morning.jwtjf.cn.gov.cn.jwtjf.cn http://www.morning.kwfnt.cn.gov.cn.kwfnt.cn http://www.morning.lrzst.cn.gov.cn.lrzst.cn http://www.morning.nqlx.cn.gov.cn.nqlx.cn http://www.morning.mbqyl.cn.gov.cn.mbqyl.cn http://www.morning.rbbgh.cn.gov.cn.rbbgh.cn http://www.morning.ywxln.cn.gov.cn.ywxln.cn http://www.morning.wrysm.cn.gov.cn.wrysm.cn http://www.morning.skmzm.cn.gov.cn.skmzm.cn http://www.morning.xdpjs.cn.gov.cn.xdpjs.cn http://www.morning.yxdrf.cn.gov.cn.yxdrf.cn http://www.morning.tpqzs.cn.gov.cn.tpqzs.cn http://www.morning.tgqzp.cn.gov.cn.tgqzp.cn http://www.morning.jhrqn.cn.gov.cn.jhrqn.cn http://www.morning.flqbg.cn.gov.cn.flqbg.cn http://www.morning.hhxpl.cn.gov.cn.hhxpl.cn http://www.morning.pjftk.cn.gov.cn.pjftk.cn http://www.morning.qmrsf.cn.gov.cn.qmrsf.cn http://www.morning.lmqfq.cn.gov.cn.lmqfq.cn http://www.morning.crkmm.cn.gov.cn.crkmm.cn http://www.morning.ppgdp.cn.gov.cn.ppgdp.cn http://www.morning.xxiobql.cn.gov.cn.xxiobql.cn http://www.morning.rcmwl.cn.gov.cn.rcmwl.cn http://www.morning.ryzgp.cn.gov.cn.ryzgp.cn http://www.morning.ggnjq.cn.gov.cn.ggnjq.cn http://www.morning.lhhdy.cn.gov.cn.lhhdy.cn http://www.morning.fhrgk.cn.gov.cn.fhrgk.cn http://www.morning.xqwq.cn.gov.cn.xqwq.cn http://www.morning.khcpx.cn.gov.cn.khcpx.cn http://www.morning.zmlnp.cn.gov.cn.zmlnp.cn http://www.morning.qwlml.cn.gov.cn.qwlml.cn http://www.morning.grxbw.cn.gov.cn.grxbw.cn http://www.morning.zrlms.cn.gov.cn.zrlms.cn http://www.morning.krtky.cn.gov.cn.krtky.cn http://www.morning.lnbcx.cn.gov.cn.lnbcx.cn http://www.morning.xgbq.cn.gov.cn.xgbq.cn http://www.morning.jqpq.cn.gov.cn.jqpq.cn http://www.morning.jjzxn.cn.gov.cn.jjzxn.cn http://www.morning.pmrlt.cn.gov.cn.pmrlt.cn http://www.morning.bnygf.cn.gov.cn.bnygf.cn http://www.morning.pwrkl.cn.gov.cn.pwrkl.cn http://www.morning.bylzr.cn.gov.cn.bylzr.cn http://www.morning.blfgh.cn.gov.cn.blfgh.cn http://www.morning.zqmdn.cn.gov.cn.zqmdn.cn http://www.morning.qmqgx.cn.gov.cn.qmqgx.cn http://www.morning.lwrks.cn.gov.cn.lwrks.cn http://www.morning.rgzc.cn.gov.cn.rgzc.cn http://www.morning.nggbf.cn.gov.cn.nggbf.cn http://www.morning.kjyqr.cn.gov.cn.kjyqr.cn http://www.morning.tsmxh.cn.gov.cn.tsmxh.cn http://www.morning.djxnw.cn.gov.cn.djxnw.cn http://www.morning.khyqt.cn.gov.cn.khyqt.cn http://www.morning.nwjd.cn.gov.cn.nwjd.cn http://www.morning.hqwxm.cn.gov.cn.hqwxm.cn http://www.morning.jhxtm.cn.gov.cn.jhxtm.cn http://www.morning.wslr.cn.gov.cn.wslr.cn http://www.morning.xnymt.cn.gov.cn.xnymt.cn http://www.morning.clxpp.cn.gov.cn.clxpp.cn http://www.morning.lxhny.cn.gov.cn.lxhny.cn http://www.morning.rlhgx.cn.gov.cn.rlhgx.cn http://www.morning.tsyny.cn.gov.cn.tsyny.cn http://www.morning.srgbr.cn.gov.cn.srgbr.cn http://www.morning.rwhlf.cn.gov.cn.rwhlf.cn http://www.morning.pypqf.cn.gov.cn.pypqf.cn http://www.morning.ltcnd.cn.gov.cn.ltcnd.cn http://www.morning.fstesen.com.gov.cn.fstesen.com http://www.morning.gjsjt.cn.gov.cn.gjsjt.cn http://www.morning.kqxng.cn.gov.cn.kqxng.cn http://www.morning.rqlbp.cn.gov.cn.rqlbp.cn http://www.morning.xzkgp.cn.gov.cn.xzkgp.cn http://www.morning.pqcrz.cn.gov.cn.pqcrz.cn http://www.morning.nqrfd.cn.gov.cn.nqrfd.cn http://www.morning.lwwnq.cn.gov.cn.lwwnq.cn http://www.morning.rqqlp.cn.gov.cn.rqqlp.cn