AsmaBaccouche / Connected-Unets-and-more

Basic UNet, AUNet, and ResNet architecture models and new variations: Connected-UNets, Connected-AUNets, and Connected-ResUNets architecture models
13 stars 10 forks source link

How do you crop your image data automatically? #3

Closed dayangkunurfaizah closed 6 months ago

dayangkunurfaizah commented 6 months ago

Hello dear. If you don't mind, could you please share how do you crop your image mammo automatically? Are there any codes could you share here? Hope that you will reply to my question. Thanks in advance.

AsmaBaccouche commented 6 months ago

Hello, what do you mean by cropping the image mamo? do you mean extracting the ROI images that will be used as input?

dayangkunurfaizah commented 6 months ago

yes, dear. What I mean is that, how do you crop the extracted ROI images as input to the U-Network?

AsmaBaccouche commented 6 months ago

The ROI extraction is done by applying a region detection algorithm like YOLO (check my previous paper/work), and then applying the same coordinates found, on the ground truth mask images. If you don't have that first step (object detection step) or you don't plan to apply it by yourself, you will have to manually prepare the data for the segmentation (annotation and cropping)

dayangkunurfaizah commented 6 months ago

Hi dear, I have read your paperwork. Yes, my first step is also goes to object detection. Could you show me which YOLO algorithm you have applied for object detection? The simple algorithm one to me apply on my data sets

AsmaBaccouche commented 6 months ago

Please check this: https://github.com/AsmaBaccouche/Early-Detection-and-Classification-of-Breast-Cancer/blob/main/yolo3_model.py

dayangkunurfaizah commented 6 months ago

Hello, I found the codes. Thank you so much. But how to link with my folder data sets? Could you please teach where can I link my folder image to the codes? I have downloaded the yolo3_model.py and yolo3_utils.py. Both no issues on my jupyter notebook.

dayangkunurfaizah commented 6 months ago

Could you please tell me, what the first step is before applying YOLO algorithm? Do I need to do a labeling image and create a folder for it?

AsmaBaccouche commented 6 months ago

Also check this main script

You need to make small changes to use it on your data, and of course you should prepare folder with the images true coordinates in a txt file for the object detection you want to apply.