필터 지우기
필터 지우기

How to use a trained neural network in GUIDE?

조회 수: 1 (최근 30일)
Malina Balint
Malina Balint 2021년 3월 31일
답변: Prasanna 2024년 4월 25일
I trained a convolutional neural network using the pre-trained network ResNet50 for medical image classification. Now I want to create a user interface in GUIDE where a user can upload a picture of a skin tumor and the net will classify it and return the label for the image. My problem is I'm not sure where should I put the network in the interface code. I am using axes for the image and a push button for the upload function, and I was thinking of using another push button for the classification.

답변 (1개)

Prasanna
Prasanna 2024년 4월 25일
Hi Malina,
To create a UI in GUIDE and integrate the pre-trained network with the same: You can load the network, set up the GUI to handle image uploads, and classify the uploaded images upon a button press. Some further instructions on the above steps include:
  • Load the Pre-trained Network: Load your pre-trained network when the GUI initializes. This can be done in the OpeningFcn of your GUIDE-generated .m file, which is executed before the GUI becomes visible.
  • Upload and Display the Image: In the callback for your upload button, you can implement functionality to upload and display the image within the axes you've designed.
  • Classify the Uploaded Image: For the classification button, you can set up a callback that processes the uploaded image according to the input requirements of your pre-trained network (e.g., resizing), performs classification, and then displays or returns the classification result.
You can refer the following documentation for more information on writing callbacks in GUIDE:
Hope this helps.

카테고리

Help CenterFile Exchange에서 Image Data Workflows에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by