"Onject ssd detection code" Code Answer's
You're definitely familiar with the best coding language Whatever that developers use to develop their projects and they get all their queries like "Onject ssd detection code" answered properly. Developers are finding an appropriate answer about Onject ssd detection code related to the Whatever coding language. By visiting this online portal developers get answers concerning Whatever codes question like Onject ssd detection code. Enter your desired code related query in the search bar and get every piece of information about Whatever code related question on Onject ssd detection code.
Onject ssd detection code
import cv2thres = 0.45 # Threshold to detect objectcap = cv2.VideoCapture(1)cap.set(3,1280)cap.set(4,720)cap.set(10,70)classNames= []classFile = 'coco.names'with open(classFile,'rt') as f: classNames = f.read().rstrip('\n').split('\n')configPath = 'ssd_mobilenet_v3_large_coco_2020_01_14.pbtxt'weightsPath = 'frozen_inference_graph.pb'net = cv2.dnn_DetectionModel(weightsPath,configPath)net.setInputSize(320,320)net.setInputScale(1.0/ 127.5)net.setInputMean((127.5, 127.5, 127.5))net.setInputSwapRB(True)while True: success,img = cap.read() classIds, confs, bbox = net.detect(img,confThreshold=thres) print(classIds,bbox) if len(classIds) != 0: for classId, confidence,box in zip(classIds.flatten(),confs.flatten(),bbox): cv2.rectangle(img,box,color=(0,255,0),thickness=2) cv2.putText(img,classNames[classId-1].upper(),(box[0]+10,box[1]+30), cv2.FONT_HERSHEY_COMPLEX,1,(0,255,0),2) cv2.putText(img,str(round(confidence*100,2)),(box[0]+200,box[1]+30), cv2.FONT_HERSHEY_COMPLEX,1,(0,255,0),2) cv2.imshow("Output",img) cv2.waitKey(1)
Source: www.murtazahassan.com
All those coders who are working on the Whatever based application and are stuck on Onject ssd detection code can get a collection of related answers to their query. Programmers need to enter their query on Onject ssd detection code related to Whatever code and they'll get their ambiguities clear immediately. On our webpage, there are tutorials about Onject ssd detection code for the programmers working on Whatever code while coding their module. Coders are also allowed to rectify already present answers of Onject ssd detection code while working on the Whatever language code. Developers can add up suggestions if they deem fit any other answer relating to "Onject ssd detection code". Visit this developer's friendly online web community, CodeProZone, and get your queries like Onject ssd detection code resolved professionally and stay updated to the latest Whatever updates.