Regression using single Image

I am very new to pytorch and want to understand, how do i pass a single image to a regression model. I want to pass a single image to a model and collects its position, the respective rgb value in each position and use a regression model to predict rgb values to given position. How do i achieve this?