python and Visual studio code

For ESP - PlatformIO IDE -  install PlatformIO IDE in VS

Terminal-  pip install mediapipe==0.10.14

    

  • python
  • import mediapipe as mp
  •  print(mp.__version__)
  • print(hasattr(mp, "solutions"))
  • import mediapipe as mp
  • print(mp.__version__)
  • print(hasattr(mp, "solutions"))
  • python(if problem then again do same)
  • final - python hand_detect.py 

 

person detector

from ultralytics import YOLO

import cv2


# Load YOLOv8 model

model = YOLO("yolov8n.pt")


# Open webcam

cap = cv2.VideoCapture(0)


while True:

    ret, frame = cap.read()


    if not ret:

        break


    # Detect objects

    results = model(frame)


    # Draw detection boxes

    annotated_frame = results[0].plot()


    # Show output

    cv2.imshow("Car Detection", annotated_frame)


    # Press ESC to exit

    if cv2.waitKey(1) == 27:

        break


cap.release()

cv2.destroyAllWindows()



code for driver - py -3.10 -m pip install mediapipe opencv-python pyserial

Comments

Popular posts from this blog

Class 8

Class 6

IOT