Realtime object detection

Hi everyone. I’m working on a simple object detection project, in this project I read every frame from my camera, and process frames, detect cars and then plot license plates on those frames, so I have a loop for every frame and do the detection with yolov7. this takes time and when I run the program the speed of video gets too slow, how can I make it fast? is there a problem with my architecture? what can I do to run my program real time? I’m working on nvidia RTX3060, I’ll appreciate any suggestion.