this code:"import cv2
import torch
from yolov5 import YOLOv5
from threading import Thread
from queue import Queue

class VideoCaptureAsync:
    def init(self, source=0):
        self.cap = cv2.VideoCapture(source)
        self.q = Queue(maxsize=1)
        self.running = False

    def start(self):
        self.running = True
        self.thread = Thread(target=self.update, args=())
        self.thread.start()
        return self

    def update(self):
        while self.running:
            ret, frame = self.cap.read()
            if not ret:
                self.running = False
                break
            if not self.q.full():
                if not self.q.empty():
                    try:
                        # Remove the previous frame
                        self.q.get_nowait()
                    except Queue.Empty:
                        pass
                self.q.put(frame)

    def read(self):
        return self.q.get()

    def stop(self):
        self.running = False
        self.thread.join()
        self.cap.release()

    def exit(self, exc_type, exc_value, traceback):
        self.cap.release()

def object_detection_camera_with_roi(source, weights=‘yolov5s.pt’, conf_thres=0.25, person_class_id=0):
    # Load the YOLOv5 model
    model = YOLOv5(weights, autoshape=True)
    model.conf = conf_thres
    model.classes = [person_class_id]  # only detect person class
    model.eval()

    source.start()
    try:
        with torch.no_grad():
            while True:
                frame = source.read()
                
                # Define ROI size and position (centered)
                h, w = frame.shape[:2]
                roi_size = min(w, h) // 3
                x1, y1 = w // 2 - roi_size // 2, h // 2 - roi_size // 2
                x2, y2 = x1 + roi_size, y1 + roi_size
                
                # Extract the ROI from the frame
                roi = frame[y1:y2, x1:x2]
                
                # Inference on the ROI
                results = model(roi)
                
                # Draw the ROI rectangle on the original frame
                cv2.rectangle(frame, (x1, y1), (x2, y2), (255, 0, 0), 2)
                
                # Count the number of people detected
                people_count = 0
                
                # Extract detections
                for *xyxy, conf, cls in results.xyxy[0]:
                    # Rescale coordinates to the original frame
                    xyxy = (torch.tensor(xyxy).view(1, 4) * torch.tensor([w / roi_size, h / roi_size, w / roi_size, h / roi_size])).view(-1).tolist()
                    x1_box, y1_box, x2_box, y2_box = [int(coord) for coord in xyxy]
                    x1_box += x1
                    y1_box += y1
                    x2_box += x1
                    y2_box += y1
                    
                    # Increment people count and draw bounding boxes and labels on the original frame
                    if conf > conf_thres:
                        people_count += 1
                        label = f’Person {conf:.2f}‘
                        cv2.rectangle(frame, (x1_box, y1_box), (x2_box, y2_box), (0, 255, 0), 2)
                        cv2.putText(frame, label, (x1_box, y1_box - 10), cv2.FONT_HERSHEY_SIMPLEX, 0.5, (0, 255, 0), 2)
                
                # Display the number of people detected
                cv2.putText(frame, f’People detected: {people_count}’, (20, 30), cv2.FONT_HERSHEY_SIMPLEX, 1, (0, 255, 0), 2)
                cv2.imshow(‘YOLOv5 Object Detection with ROI - Camera’, frame)

                # Break loop with ‘q’
                if cv2.waitKey(1) == ord(‘q’):
                    break
    finally:
        source.stop()
        cv2.destroyAllWindows()

if name == ‘main’:
    video_capture = VideoCaptureAsync(source=0)
    object_detection_camera_with_roi(source=video_capture, weights=‘yolov5s.pt’, conf_thres=0.25)

"

PS C:\Users\User\Desktop\New folder> & C:/Users/User/AppData/Local/Programs/Python/Python39/python.exe "c:/Users/User/Desktop/New folder/comvis.py"
  File "c:\Users\User\Desktop\New folder\comvis.py", line 45
    def object_detection_camera_with_roi(source, weights=‘yolov5s.pt’, conf_thres=0.25, person_class_id=0):
                                                         ^
SyntaxError: invalid character '‘' (U+2018)