Goal #3 will involve detecting objects but behold ML detecting too much:

Cars with some rear-view mirrors also detected as cars.

The script:

from ultralytics import YOLO
model = YOLO('weights/yolov8n.pt') # nano
results = model('cars-512.jpg', imgsz=512, save=True, conf=0.1) # saves in runs/detect/predict

The conf parameter filters all matches with lower confidence out.

Note that I originally used a show=True parameter but it just blocked on Linux.

You can find more information on how to use the Library in its GitHub page and Documentation.