lindawangg / COVID-Net

COVID-Net Open Source Initiative
Other
1.15k stars 480 forks source link

Images in covid class are not NxN in dimensions #100

Closed Electro1111 closed 3 years ago

Electro1111 commented 3 years ago

I've noticed that most of the images in the COVID class are not square in dimensions but many of the images in the other two classes are square in dimension. How is this problem circumvented in the training process?

haydengunraj commented 3 years ago

Before being passed to the models, images are resized to a uniform square shape.

Electro1111 commented 3 years ago

are the covid images distorted from their original dimensions or is it filled in with black pixels

On Sat, Nov 7, 2020 at 9:08 PM Hayden Gunraj notifications@github.com wrote:

Before being passed to the models, images are resized to a uniform square shape.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/lindawangg/COVID-Net/issues/100#issuecomment-723531323, or unsubscribe https://github.com/notifications/unsubscribe-auth/AP7YI3UMPCC55G4CCLJRYVTSOYRWBANCNFSM4TKSV36Q .

haydengunraj commented 3 years ago

No distortion occurs since images are center-cropped to a square region before resizing. See this function for more details on the exact processing steps.

Electro1111 commented 3 years ago

Ahh ok. I noticed it also removes a % from the top of the image as well. What is the motivation here?

On Sat, Nov 7, 2020 at 9:39 PM Hayden Gunraj notifications@github.com wrote:

No distortion occurs since images are center-cropped to a square region before resizing. See this function https://github.com/lindawangg/COVID-Net/blob/bb90283d696db1712debb21840ab6c2cd484400c/data.py#L20 for more details on the exact processing steps.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/lindawangg/COVID-Net/issues/100#issuecomment-723533841, or unsubscribe https://github.com/notifications/unsubscribe-auth/AP7YI3T4YKKWD7VF53325S3SOYVJJANCNFSM4TKSV36Q .

haydengunraj commented 3 years ago

My understanding is that this part of the image usually contains the head/neck/shoulders, and so it is not important for classification. The removal of the top helps center the lungs in the image so that center cropping is effective.