Skip to content

Low GPU usage and low FPS. #49

Description

@sieuwe1

Hi @PingoLH

I have changed test.py to run on a video. See implementation below:

device, model = init_model(args)
 proc_size = eval(args.size)

 cap = cv2.VideoCapture("/home/sieuwe/Downloads/Garmin Dash Cam 55 Video Sample (Highway) _ 1080p 30fps (HDR).mp4")

 while(True):

     begin = time.perf_counter()
     ret, frame = cap.read()
     img_raw, decoded = process_img(frame, proc_size, device, model)
     cv2.imshow("OUT",decoded)
     cv2.imshow("IN",img_raw)
     end = time.perf_counter()
     print("fps", 1 / (end - begin))

     if cv2.waitKey(1) & 0xFF == ord('q'):
         break

 cap.release()
 cv2.destroyAllWindows()

I am running a GTX1080 and thus expected a FPS of around 40. I however got a much lower fps of 21. When looking at my GPU util in nvidia-smi I see that it only uses 10% of my gpu. How can I increase the GPU util to get higher FPS.

Using CUDA 10.2 on Ubunut 18.04 with pytorch version 1.4.0

Thanks for your help

Sieuwe

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions