How to inference on image using .pth model file

Hello, I am using PyTorch for the first time. I have no background in ML. I already have images and the .pth model file. Pardon me I ask very basic questions
My doubts are:

  • How to run inference on my images using the .pth file.

  • What will be the output of the inference.

Do you know how the .pth file was created?
I.e. is it containing

  • a state_dict? In that case you would need to get the source code of the model definition, create a model instance and load the state_dict. Once this is done, you can pass the input tensor to the model to get the output.
  • a directly stored model? In that case, you would still need to get the source files and make sure they are in the same locations as described in the serialization docs. Note that this approach is not recommended, as it may break in various ways.
  • a scripted model? In that case you could load the model via torch.jit.load and pass the input tensor to the model to get the output.

I did not create the model, but one of our ex-employee created this using YOLCAT++. is this enough info?