Extract Image Features for regression

조회 수: 2 (최근 30일)
Mehrdad Arashpour
Mehrdad Arashpour 2021년 5월 20일
댓글: Mehrdad Arashpour 2021년 5월 27일
Hello,
I have converted MobileNet to a regression Model by replacing relevant layers. Training and testing were successfully done and x,y coordinates of keypoints of interest are predicted.
Now I am trying to extract features of the trained network for prediction
layer='regressionoutput'
featuresTrain = activations(BodyEstimate,Train,layer,"OutputAs","rows")
featuresTest = activations(BodyEstimate,Test,layer,'OutputAs','rows')
whos featuresTrain
The code returns 'featresTrain' as 3011x2 single (2 is related to x,y ccordinates). I have been unsuccessful to fit a regression model using the following code:
regressor=fitrauto(featuresTrain,Y)
How should I prepare 'Response data' in 'Y', conseidering that responses are x,y coordinates of keypoints in images?
Thanks
  댓글 수: 2
Shashank Gupta
Shashank Gupta 2021년 5월 26일
Hi,
Help me understand few things, I am assuming it is supervised problem where you have the information of coordinates of keypoints in images, So what is stopping you to prepare the response data. I am trying to understand the difficulty in preparation. Also you mentioned, you changed some layers for MobileNet model and then train and test it, what exactly you train? what is the response data you used to train that model. It is unclear and not trivial for me to make any assumption or understand it. Help me understand it.
Cheers.
Mehrdad Arashpour
Mehrdad Arashpour 2021년 5월 27일
Hi Shashank,
Yes, this is supervised learning and the training is done by feeding a set of images and also a table containg 'image path' and x,y coordinates of keypoints (known). For validation and testing, there are 2 other sets of images and tables of coordinates.
The problem starts with fitrauto(featuresTrain,Y) since 'Y' cannot be a table. I have tried using matrix, double, vector... formats but it returns this error: 'Y should be a single or double vector'.
I have only succeeded to fit separate regression models for x and then y coordinates. Is there a way to define 'Y' so that one regression model predicts both x,y coordinates at once? The workflow is straightforward for classification but NOT for regression.
Thanks

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Gaussian Process Regression에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by