基于OpenCV與Keras的停車場車位自動識別系統

本項目旨在利用計算機視覺技術和深度學習算法,實現對停車場車位狀態的實時自動識別。通過攝像頭監控停車場內部,系統能夠高效準確地辨認車位是否被占用,為車主提供實時的空閑車位信息,同時為停車場管理者提供智能化的車位管理工具。該系統結合了OpenCV的強大圖像處理能力與Keras的易用性,便于快速構建和部署。

技術棧:

  • OpenCV:用于圖像的預處理,包括視頻捕獲、圖像處理(如灰度轉換、濾波、邊緣檢測等)以及ROI(感興趣區域)的選取,為深度學習模型提供高質量的輸入。
  • Keras:基于TensorFlow的高級API,用于搭建和訓練深度學習模型。項目中,可能采用預訓練模型(如VGGNet、ResNet等)進行遷移學習,通過微調模型來適應車位識別任務,或者從零開始構建卷積神經網絡(CNN)模型進行車位狀態分類。

項目流程:

  1. 數據收集與預處理:首先,通過攝像頭錄制停車場視頻,從中截取包含車位的畫面,人工標注車位狀態(如空閑或占用)。接著,對圖像進行歸一化、增強等預處理,創建訓練和驗證數據集。

  2. 模型訓練:使用Keras構建深度學習模型,加載預處理后的數據集進行訓練。訓練過程中,可能涉及調整超參數、優化器選擇、損失函數配置等,以達到理想的分類性能。

  3. 模型驗證與優化:在驗證集上評估模型性能,根據準確率、召回率等指標調整模型結構或參數,進行模型優化。

  4. 實時檢測與應用:將訓練好的模型集成到OpenCV中,實現實時視頻流處理。系統不斷捕獲停車場的視頻幀,進行圖像處理后,通過模型預測車位狀態。識別結果以可視化方式展示,如在視頻流中標記車位為空閑或占用,并可進一步集成到停車場管理系統,實現車位引導、計費等功能。

特色與優勢:

  • 實時性:系統能夠實時監控車位狀態,及時更新信息,提高停車場的運營效率。
  • 準確性:深度學習模型具有強大的特征學習能力,即使在復雜光照、遮擋等條件下也能保持較高識別準確率。
  • 易部署與擴展:基于OpenCV和Keras的方案易于開發和調試,且模型可根據新數據持續優化,便于后續維護和功能升級。
  • 智能化管理:為停車場管理者提供精準的車位占用情況,有助于優化停車資源分配,提升用戶體驗。

總結: 此項目通過融合OpenCV的圖像處理能力和Keras構建的深度學習模型,實現了對停車場車位狀態的自動識別,是智能交通系統和智慧城市應用中的一個重要組成部分,具有廣泛的應用前景和社會價值。

from __future__ import division # 改變 Python 2 中除法操作符 / 的默認行為,使其表現得像 Python 3 中的除法操作符,結果會保留小數部分
import  matplotlib.pyplot as plt # 用于創建圖表和可視化數據的 Python 庫
import cv2
import os, glob # glob文件名匹配的模塊
import numpy as np
from PIL import Image
from keras.applications.imagenet_utils import preprocess_input
from keras.models import load_model
from keras.preprocessing import image
from Parking import Parking
import pickle   # 序列化和反序列化對象的標準模塊cwd = os.getcwd() # 獲取當前工作目錄def img_process(test_images, park):# 過濾背景,低于lower_red和高于upper_red的部分分別編程0,lower_red~upper_red之間的值編程255# map 函數用于將一個函數應用到可迭代對象的每個元素,并返回結果# 通過 list 函數將其轉換為列表white_yellow_images = list(map(park.select_rgb_white_yellow,test_images))park.show_images(white_yellow_images)# 轉灰度圖gray_images = list(map(park.convert_gray_scale, white_yellow_images))park.show_images(gray_images)# 進行邊緣檢測edge_images = list(map(lambda image: park.detect_edges(image),gray_images))park.show_images(edge_images)# 根據需要設定屏蔽區域roi_images = list(map(park.select_region, edge_images))park.show_images(roi_images)# 霍夫變換,得出直線list_of_lines= list(map(park.hough_line, roi_images))# zip 函數來同時迭代 test_images 和 list_of_lines 中的元素line_images = []for image,lines in zip(test_images,list_of_lines):line_images.append(park.draw_lines(image,lines))park.show_images(line_images)rect_images = []rect_coords = [] # 列矩形for image,lines in zip(test_images, list_of_lines):# 過濾部分直線,對直線進行排序,得出每一列的起始點和終止點,并將列矩形畫出來new_image,rects = park.identify_blocks(image,lines)rect_images.append(new_image)rect_coords.append(rects)park.show_images(rect_images)delineated = []spot_pos = []for image,rects in zip(test_images, rect_coords):# 在圖上將停車位畫出來,并返回字典{坐標:車位序號}new_image,spot_dict = park.draw_parking(image,rects)delineated.append(new_image)spot_pos.append(spot_dict)park.show_images(delineated)final_spot_dict = spot_pos[1]print(len(final_spot_dict))with open('spot_dict.pickle','wb') as handle:pickle.dump(final_spot_dict,handle,property==pickle.HIGHEST_PROTOCOL)park.save_images_for_cnn(test_images[0],final_spot_dict)return final_spot_dictdef keras_model(weights_path):model = load_model(weights_path)return modeldef img_test(test_image,final_spot_dict,model,class_dictionary):for i in range (len(test_images)):predicted_images = park.predict_on_image(test_images[i],final_spot_dict,model,class_dictionary)def video_test(video_name,final_spot_dict,model,class_dictionary):name = video_namecap = cv2.VideoCapture(name)park.predict_on_video(name,final_spot_dict,model,class_dictionary,ret=True)if __name__ == '__main__':test_images = [plt.imread(path) for path in glob.glob('test_images/*.jpg')]weights_path = 'car1.h5'video_name = 'parking_video.mp4'class_dictionary = {}class_dictionary[0] = 'empty'class_dictionary[1] = 'occupied'park = Parking()park.show_image(test_images)final_spot_dict = img_process(test_images, park)model = keras_model(weights_path)img_test(test_images,final_spot_dict,model,class_dictionary)video_test(video_name,final_spot_dict,model,class_dictionary)

parking py

import matplotlib.pyplot as plt
import cv2
import os,glob
import numpy as npclass Parking:def show_images(self, images, cmap=None):cols = 2rows = (len(images) + 1)//cols # //為整除運算符plt.figure(figsize=(15,12)) # 創建一個圖形窗口,并指定其大小為 15x12 英寸for i,image in enumerate(images):plt.subplot(rows, cols, i+1) # 在當前圖形窗口中創建一個子圖,i+1 是因為子圖的編號是從 1 開始的# 檢查圖像的維度,如果圖像是二維的(灰度圖像),則將顏色映射設置為灰度,否則保持傳入的 cmap 參數不變cmap = 'gray' if len(image.shape)==2 else cmapplt.imshow(image, cmap=cmap)plt.xticks([]) # 去除 x 軸和 y 軸的刻度標簽plt.yticks([])plt.tight_layout(pad=0,h_pad=0,w_pad=0) # 調整子圖之間的間距plt.show()def cv_show(self, name, img):cv2.imshow(name, img)cv2.waitKey(0)cv2.destroyAllWindows()def select_rgb_white_yellow(self,image):# 過濾掉背景lower = np.uint8([120,120,120])upper = np.uint8([255,255,255])# 低于lower_red和高于upper_red的部分分別編程0,lower_red~upper_red之間的值編程255,相當于過濾背景white_mask = cv2.inRange(image,lower,upper)self.cv_show('white_mask',white_mask)# 與操作masked = cv2.bitwise_and(image, image, mask=white_mask)self.cv_show('masked',masked)return maskeddef convert_gray_scale(selfself,image):return cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)# 提取圖像中的邊緣信息# 返回的是一個二值圖像,其中邊緣點被標記為白色(255),而非邊緣點被標記為黑色(0)def detect_edges(self, image, low_threshole=50, high_threshold=200):return cv2.Canny(image, low_threshole, high_threshold)def filter_region(self, image, vertices):# 剔除掉不需要的地方mask = np.zeros_like(image) # 創建和原圖一樣大的圖,置零if len(mask.shape)==2: # 是否為一張灰度圖cv2.fillPoly(mask, vertices, 255) # 使用頂點vertices在mask上填充多邊形,并置為255白色self.cv_show('mask',mask)return  cv2.bitwise_and(image,mask)def select_region(self, image):# 手動選擇區域# 首先,通過頂點定義多邊形。rows, cols = image.shape[:2] # h和wpt_1 = [cols*0.05, rows*0.09]pt_2 = [cols*0.05, rows*0.70]pt_3 = [cols*0.30, rows*0.55]pt_4 = [cols*0.6,  rows*0.15]pt_5 = [cols*0.90, rows*0.15]pt_6 = [cols*0.90, rows*0.90]vertices = np.array([[pt_1, pt_2, pt_3, pt_4, pt_5, pt_6]],dtype=np.int32)point_img = image.copy()point_img = cv2.cvtColor(point_img, cv2.COLOR_BGR2GRAY)for point in vertices[0]:cv2.circle(point_img,(point[0], point[1]), 10, (0,0,255), 4)self.cv_show('point_img',point_img)return self.filter_region(image, vertices)# 霍夫變換,得出直線def hough_line(self,image):# 檢測輸入圖像中的直線,并返回檢測到的直線的端點坐標# 輸入的圖像需要是邊緣檢測后的結果# minLineLength(線的最短長度,比這個短的都被忽略)和MaxLineCap(兩條直線之間的最大間隔,小于辭職,認為是一條直線)# rho以像素為單位的距離分辨率,通常設置為 1 像素# thrta角度精度# threshod直線交點數量閾值。只有累加器中某個點的投票數高于此閾值,才被認為是一條直線。return cv2.HoughLinesP(image, rho=0.1, thrta=np.pi/10, threshold=15,minLineLength=9,maxLineGap=4)# 過濾霍夫變換檢測到的直線def draw_lines(self, image, lines, color=[255,0,0], thickness=2, make_copy=True):if make_copy:image = np.copy(image)cleaned = []for line in lines:for x1,y1,x2,y2 in line:if abs(y2-y1) <= 1 and abs(x2-x1) >= 25 and abs(x2-x1) <= 55:cleaned.append((x1,y1,x2,y2))cv2.line(image, (x1,y1), (x2,y2), color, thickness)print(" No lines detected: ", len(cleaned))return image# 過濾部分直線,對直線進行排序,得出每一列的起始點和終止點,并將列矩形畫出來def identify_blocks(self, image, lines, make_copy=True):if make_copy:new_image = np.copy(image)# step1: 過濾部分直線cleaned = []for line in lines:for x1,y1,x2,y2 in line:if abs(y2-y1) <= 1 and abs(x2-x1) >= 25 and abs(x2-x1)<= 55:cleaned.append((x1,y1,x2,y2))# step2: 對直線按照 起始點的x和y坐標 進行排序import operator # 可以使用其中的各種函數來進行操作,例如比較、算術list1 = sorted(cleaned, key=operator.itemgetter(0,1)) # 從列表的每個元素中獲取索引為0和1的值,然后將這些值用作排序的依據# step3: 找到多個列,相當于每列是一排車clusters = {} # 列數:對應該列有哪些車位線dIndex = 0clus_dist = 10for i in range(len(list1) - 1):distance = abs(list1[i+1][0] - list1[i][0]) # 根據前后兩組車位線的x1距離if distance <= clus_dist:if not dIndex in clusters.keys(): clusters[dIndex] = []clusters[dIndex].append(list1[i])clusters[dIndex].append(list1[i + 1])else:dIndex += 1# step4: 得到每一列的四個坐標rects = {} # 每一列的四個角的坐標i = 0for key in clusters:all_list = clusters[key]# 將列表 all_list 轉換為一個集合set,去重# {(10, 20, 30, 40), (20, 30, 40, 50)} 轉為 [(10, 20, 30, 40), (20, 30, 40, 50)]cleaned = list(set(all_list))if len(cleaned) > 5:cleaned = sorted(cleaned, key=lambda tup: tup[1]) # 按y1進行排序avg_y1 = cleaned[0][1]  # 第一條線段的起始點 y 坐標avg_y2 = cleaned[-1][1] # 最后一條線段的起始點 y 坐標,即整個區域的上下邊界avg_x1 = 0avg_x2 = 0for tup in cleaned: # 累加起始點和結束點的 x 坐標avg_x1 += tup[0]avg_x2 += tup[2]avg_x1 = avg_x1/len(cleaned) # 取平均起始點和結束點x坐標值avg_x2 = avg_x2/len(cleaned)rects[i] = (avg_x1, avg_y1,avg_x2,avg_y2)i += 1print("Num Parking Lanes:", len(rects))# step5: 把列矩形畫出來buff = 7for key in rects:tup_topLeft = (int(rects[key][0] - buff), int(rects[key][1])) # x1-buff, y1tup_botRight = (int(rects[key][2] + buff), int(rects[key][3])) # x2+buff, y2cv2.rectangle(new_image, tup_topLeft, tup_botRight,(0,255,0),3)return new_image,rects# 在圖上將停車位畫出來,并返回字典{坐標:車位序號}def draw_parking(self, image, rects, make_copy=True, color=[255,0,0], thickness=2, save=True):if make_copy:new_image = np.copy(image)gap = 15.5 # 一個車位大致高度spot_dict = {} # 字典:一個車位對應一個位置tot_spots = 0 # 總車位# 微調adj_y1 = {0: 20, 1: -10, 2: 0, 3: -11, 4: 28, 5: 5, 6: -15, 7: -15, 8: -10, 9: -30, 10: 9, 11: -32}adj_y2 = {0: 30, 1: 50, 2: 15, 3: 10, 4: -15, 5: 15, 6: 15, 7: -20, 8: 15, 9: 15, 10: 0, 11: 30}adj_x1 = {0: -8, 1: -15, 2: -15, 3: -15, 4: -15, 5: -15, 6: -15, 7: -15, 8: -10, 9: -10, 10: -10, 11: 0}adj_x2 = {0: 0, 1: 15, 2: 15, 3: 15, 4: 15, 5: 15, 6: 15, 7: 15, 8: 10, 9: 10, 10: 10, 11: 0}for key in rects:tup = rects[key]x1 = int(tup[0] + adj_x1[key])x2 = int(tup[2] + adj_x2[key])y1 = int(tup[1] + adj_y1[key])y2 = int(tup[3] + adj_y2[key])cv2.rectangle(new_image,(x1,y1), (x2,y2), (0,255,0), 2)num_splits = int(abs(y2-y1)//gap) # 一列總共有多少個車位for i in range (0,num_splits+1):   # 畫車位框y = int(y1 + i*gap)cv2.rectangle(new_image, (x1,y), (x2,y2), (0,255,0), 2)if key > 0 and key < len(rects)-1:# 豎直線x = int((x1+x2)/2)cv2.line(new_image,(x,y1),(x,y2),color,thickness)# 計算數量if key == 0 or key == (len(rects) - 1): # 對于第一列和最后一列(只有一排車位)tot_spots += num_splits + 1else:tot_spots += 2*(num_splits + 1)     # 一列有兩排車位# 字典對應好if key == 0 or key == (len(rects) - 1): # 對于第一列和最后一列(只有一排車位)for i in range(0, num_splits+1):cur_len = len(spot_dict)y = int(y1 + i*gap)spot_dict[(x1,y,x2,y+gap)] = cur_len + 1else:for i in range(0, num_splits+1):cur_len = len(spot_dict)y = int(y1 + i*gap)x = int((x1+x2)/2)spot_dict[(x1,y,x,y+gap)] = cur_len + 1spot_dict[(x,y,x2,y+gap)] = cur_len + 2print("total parking spaces: ", tot_spots, cur_len)if save:filename = 'with_parking.jpg'cv2.imwrite(filename, new_image)return new_image, spot_dict# 根據傳入的起始點和終止點坐標列表畫框def assign_spots_map(self, image, spot_dict, make_copy= True, color=[255,0,0], thickness=2):if make_copy:new_image = np.copy(image)for spot in spot_dict.keys():(x1,y1,x2,y2) = spotcv2.rectangle(new_image,(int(x1),int(y1)), (int(x2),int(y2)), color, thickness)return new_image# 遍歷字典{坐標,車位號}在圖片中截取對應坐標的圖像,按車位號保存下來def save_images_for_cnn(self, image, spot_dict, folder_name= 'cnn_data'):for spot in spot_dict.keys():(x1,y1,x2,y2) = spot(x1,y1,x2,y2) = (int(x1),int(y1),int(x2),int(y2))# 裁剪spot_img= image[y1:y2, x1:x2]spot_img = cv2.resize(spot_img, (0,0), fx=2.0, fy=2.0)spot_id = spot_dict[spot]filename = 'spot' + str(spot_id) + '.jpg'print(spot_img.shape, filename, (x1,x2,y1,y2))cv2.imwrite(os.path.join(folder_name, filename), spot_img)# 將圖像進行歸一化,并將其轉換成一個符合深度學習模型輸入要求的四維張量,進行訓練def make_prediction(self, image, model, class_dictionary):# 預處理img = image/255. # 將圖像的像素值歸一化到 [0, 1] 的范圍內# 將圖像轉換成一個四維張量image = np.expend_dims(img, axis = 0)# 將圖片調用keras算法進行預測class_predicted = model.predict(image) # 得出預測結果inID = np.argmax(class_predicted[0]) # 找到數組中最大值所在的索引label = class_dictionary[inID]return labeldef predict_on_image(self, image, spot_dict, model, class_dictionary,make_copy=True, color=[0,255,0], alpha=0.5):if make_copy:new_image = np.copy(image)overlay = np.copy(image)self.cv_show('new_image',new_image)cnt_empty = 0all_spots = 0for spot in spot_dict.keys():all_spots += 1(x1, y1, x2, y2) = spot(x1, y1, x2, y2) = (int(x1), int(y1), int(x2), int(y2))spot_img = image[y1:y2, x1:x2]spot_img = cv2.resize(spot_img, (48,48))label = self.make_prediction(spot_img, model, class_dictionary)if label== 'empty':cv2.rectangle(overlay, (int(x1), int(y1)), (int(x2), int(y2)), color, -1)cnt_empty += 1cv2.addWeighted(overlay, alpha, new_image, 1-alpha, 0, new_image)cv2.putText(new_image, "Available: %d spots" %cnt_empty, (30,95),cv2.FONT_HERSHEY_SIMPLEX,0.7,(255,255,255),2)cv2.putText(new_image, "Total: %d spots" %all_spots, (30,125),cv2.FONT_HERSHEY_SIMPLEX, 0.7,(255,255,255),2)save = Falseif save:filename = 'with_parking.jpg'cv2.imwrite(filename, new_image)self.cv_show('new_image',new_image)return new_imagedef predict_on_video(self, video_name, final_spot_dict, model, class_dictionary, ret=True):cap= cv2.VideoCapture(video_name)count = 0while ret:ret, image = cap.read()count += 1if count == 5:count == 0new_image = np.copy(image)overlay = np.copy(image)cnt_empty = 0all_spots = 0color = [0,255,0]alpha = 0.5for spot in final_spot_dict.keys():all_spots += 1(x1,y1,x2,y2) = spot(x1,y1,x2,y2) = (int(x1), int(y1), int(x2), int(y2))spot_img = image[y1:y2, x1:x2]spot_img = cv2.resize(spot_img, (48,48))label = self.make_prediction(spot_img, model, class_dictionary)if label == 'empty':cv2.rectangle(overlay, (int(x1),int(y1)), (int(x2),int(y2)), color, -1)cnt_empty += 1cv2.addWeighted(overlay, alpha, new_image, 1-alpha, 0, new_image)cv2.putText(new_image,"Available: %d spots" % cnt_empty,(30,95),cv2.FONT_HERSHEY_SIMPLEX, 0.7, (255,255,255),2)cv2.putText(new_image, "Total: %d spots" %all_spots, (30,125),cv2.FONT_HERSHEY_SIMPLEX, 0.7, (255,255,255), 2)cv2.imshow('frame',new_image)# 檢測用戶是否按下了 'q' 鍵if cv2.waitKey(10) & 0xFF == ord('q'): # 通過 & 0xFF 操作,可以確保只獲取ASCII碼的最后一個字節breakcv2.destroyWindow()cap.release()

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/diannao/39157.shtml
繁體地址,請注明出處:http://hk.pswp.cn/diannao/39157.shtml
英文地址,請注明出處:http://en.pswp.cn/diannao/39157.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

網優小插件_基于chrome瀏覽器Automa插件編寫抓取物業點信息小工具

日常在無線網絡優化&#xff0c;經常需要提取某一地市&#xff0c;某個屬性物業點信息&#xff08;物業點名稱、地址、及經緯度信息&#xff09;&#xff0c;本文介紹基于chrome瀏覽器Automat插件開發自動化工具&#xff0c;利用百度地圖經緯度拾取網資源開發一個抓取物業點基本…

2024年了cv還有什么可以卷的嗎?

2024年&#xff0c;計算機視覺&#xff08;CV&#xff09;領域依然有很多可以探索和創新的方向。以下是一些潛在的研究熱點&#xff1a; 自監督學習與無監督學習&#xff1a;繼續探索如何在沒有大量標注數據的情況下訓練高性能的模型&#xff0c;尤其是跨模態自監督學習和多任務…

為什么這幾年參加PMP考試的人越來越多

參加PMP認證的人越來越多的原因我認為和社會發展、職場競爭、個人提升等等方面有著不小的關系。國際認證與國內認證的性質、發展途徑會有一些區別&#xff0c;PMP引進到中國二十余年&#xff0c;報考人數持增長狀態也是正常的。 具體可以從下面這幾個點來展開論述。 市場競爭…

全面掌握 Postman 數據導入與導出:詳細指南

Postman 是一款廣泛使用的 API 開發工具&#xff0c;它提供了豐富的功能來幫助開發者測試、開發和維護 API。其中&#xff0c;數據導入和導出是 Postman 中非常重要的功能之一&#xff0c;它們允許用戶將工作從一個環境遷移到另一個環境&#xff0c;或者與團隊成員共享配置。本…

面試專區|【88道測試工具考核高頻題整理(附答案背誦版)】

常用的監控工具有哪些&#xff1f; 常用的監控工具有以下幾種&#xff1a; Zabbix&#xff1a;是一個基于WEB界面的提供分布式系統監視以及網絡監視功能的企業級開源解決方案&#xff0c;能監視各種網絡參數&#xff0c;保證服務器系統的安全運營&#xff0c;并提供靈活的通知…

Rakis: 免費基于 P2P 的去中心化的大模型

是一個開源的&#xff0c;完全在瀏覽器中運行的去中心化 AI 推理網絡&#xff0c;用戶無需服務器&#xff0c;打開即可通過點對點網絡使用 Llama-3、Mistral、Gemma-2b 等最新開源模型。 你可以通過右上角的 Scale Worker &#xff0c;下載好模型后掛機就能作為節點加入到這個…

JVM線上監控環境搭建Grafana+Prometheus+Micrometer

架構圖 一: SpringBoot自帶監控Actuator SpringBoot自帶監控功能Actuator&#xff0c;可以幫助實現對程序內部運行情況監控&#xff0c;比如監控內存狀況、CPU、Bean加載情況、配置屬性、日志信息、線程情況等。 使用步驟&#xff1a; 1. 導入依賴坐標 <dependency><…

比武招親大會

題目 郭靖夫婦在襄陽城舉辦比武招親大會&#xff0c;為女兒尋覓佳婿。比賽一共三關&#xff0c;第一關比武功。你身懷九陽神功&#xff0c;楊過使出了絕學黯然銷魂掌依然敗給了你。來自蒙古的耶律齊也不是你的對手&#xff0c;黃蓉吃驚與你的武功之高&#xff0c;打心底里為女…

海外報紙媒體投放形式分為哪些?傳播當中有什么優勢-大舍傳媒

國外報紙媒體投放新聞稿作為一種傳統而有效的傳播方式&#xff0c;依然在現代媒體環境中保持著其獨特的價值和權威性。以下幾點闡述了報紙媒體宣發的幾個關鍵方面&#xff0c;特別是當通過專業機構如大舍傳媒進行操作時&#xff1a; 權威性和公信力&#xff1a;報紙作為歷史悠久…

基于Hadoop平臺的電信客服數據的處理與分析③項目開發:搭建Kafka大數據運算環境---任務12:安裝Kafka

任務描述 任務內容為安裝和配置Kafka集群。 任務指導 Kafka是大數據生態圈中常用的消息隊列框架 具體安裝步驟如下&#xff1a; 1. 解壓縮Kafka的壓縮包 2. 配置Kafka的環境變量 3. 修改Kafka的配置文件&#xff0c;Kafka的配置文件存放在Kafka安裝目錄下的config中 4. 驗證…

擴散模型在機器學習中的應用及原理

擴散模型在機器學習中的應用及原理 大家好&#xff0c;我是免費搭建查券返利機器人省錢賺傭金就用微賺淘客系統3.0的小編&#xff0c;也是冬天不穿秋褲&#xff0c;天冷也要風度的程序猿&#xff01; 什么是擴散模型&#xff1f; 在機器學習中&#xff0c;擴散模型&#xff…

運動館預約管理系統設計

設計一個運動館預約管理系統&#xff0c;需要考慮到用戶需求、系統功能、技術實現和用戶體驗等多個方面。以下是一個基本的設計框架&#xff1a; 1. 系統目標 提供便捷的運動場地預約服務。 實現運動館資源的有效管理和利用。 支持在線支付&#xff0c;提高交易效率。 提供數…

LangChain 一 hello LLM

本來想先寫LangChain系列的&#xff0c;但是最近被AutoGen、LlamaIndex給吸引了。2023就要過去了&#xff0c;TIOBE數據編程語言排名Python都第一了&#xff0c;可見今年AI開發之熱。好吧&#xff0c;一邊學習業界通用的LangChain框架&#xff0c;一邊準備跨年吧。 前言 先是O…

使用 PostGIS 生成矢量圖塊

您喜歡視聽學習嗎&#xff1f;觀看視頻指南&#xff01; 或者直接跳到代碼 Overture Maps Foundation是由亞馬遜、Meta、微軟和 tomtom 發起的聯合開發基金會項目&#xff0c;旨在創建可靠、易于使用、可互操作的開放地圖數據。 Overture Maps 允許我們以GeoJSON格式下載開放…

【面試系列】產品經理高頻面試題及詳細解答

歡迎來到我的博客&#xff0c;很高興能夠在這里和您見面&#xff01;歡迎訂閱相關專欄&#xff1a; ?? 全網最全IT互聯網公司面試寶典&#xff1a;收集整理全網各大IT互聯網公司技術、項目、HR面試真題. ?? AIGC時代的創新與未來&#xff1a;詳細講解AIGC的概念、核心技術、…

工業讀碼器與商用掃碼器的區別

條碼二維碼在數字信息化應用越來越廣泛&#xff0c;掃碼器成為了數據收集和處理的重要工具&#xff0c;無論是工廠生產和物流包裹朔源追蹤&#xff0c;還是商場超市掃碼收銀和餐飲娛樂等場景&#xff0c;均能看到掃碼器的輔助&#xff0c;市場上的掃碼器種類繁多&#xff0c;在…

【力扣】贖金信

&#x1f525;博客主頁&#xff1a; 我要成為C領域大神&#x1f3a5;系列專欄&#xff1a;【C核心編程】 【計算機網絡】 【Linux編程】 【操作系統】 ??感謝大家點贊&#x1f44d;收藏?評論?? 本博客致力于知識分享&#xff0c;與更多的人進行學習交流 ? 給你兩個字符串…

C++ //練習 14.20 為你的Sales_data類定義加法和復合賦值運算符。

C Primer&#xff08;第5版&#xff09; 練習 14.20 練習 14.20 為你的Sales_data類定義加法和復合賦值運算符。 環境&#xff1a;Linux Ubuntu&#xff08;云服務器&#xff09; 工具&#xff1a;vim 代碼塊 struct Sales_data{Sales_data(const string &s, unsigned …

研發都認為DBA很Low?我反手一個嘴巴子

作者&#xff1a;IT邦德 中國DBA聯盟(ACDU)成員&#xff0c;10余年DBA工作經驗&#xff0c; Oracle、PostgreSQL ACE CSDN博客專家及B站知名UP主&#xff0c;全網粉絲10萬 擅長主流Oracle、MySQL、PG、高斯及Greenplum備份恢復&#xff0c; 安裝遷移&#xff0c;性能優化、故障…

antd(5.x) Popover 的content有個modal,關不掉了

問題描述&#xff1a; 如上圖所示&#xff0c;我的提示modal 關不掉了&#xff0c;思考問題癥結在handleVisibleChange const content (<div className{styles.box}>別的樣式</div>{/* 鏈接 */}<div className{styles.linkBox}><Modaltitle{提示}open{…