Transfer learning yolo5 using pytorch

Hello everyone

I am working on my graduation project, I am stuck in building an object detection model to detect vehicles (cars, buses, bicycles …etc)

I used yolo3, 5, and x, but it’s time-consuming on raspberry pi and even laptop CPU.

is there a way to optimize yolo like transfer learning or should I create from scratch? in both cases, I will be grateful if you shared resources