PiLab-CAU / ComputerVision-2401

Computer Vision Course 2024-01
Apache License 2.0
9 stars 3 forks source link

[Lecture11][0614] Small typo in slide & questions about dimension order in Pytorch #45

Closed yewonkim01 closed 1 day ago

yewonkim01 commented 2 weeks ago

typo

  1. p.5 men -> mean image

  2. p.12 dtaset -> dataset image

  3. p.14 RandomResize"d"Crop image

question

p.20 image

  1. NCWH -> NCHW In PyTorch, the dimension order of input values is known to be NC"HW". However, in the CutMix slide, it seems to be in NC"WH" order. So I think in W = size[2], 2 should be changed to 3 and in H = size[3], 3 should be changed to 2. Additionally, in the cutmix_data function on the left, since the third dimension is H and the fourth dimension is W, I think the order of bbx and bby should be swapped. Am I correct?

  2. np.int deprecated I knew that np.int has been deprecated in PyTorch. Currently, np.int32 or np.int64 is being used. Could you please check this?

yjyoo3312 commented 2 weeks ago

@yewonkim01 Thank you first for the typo (I will revise it to the final version) and questions.

  1. Wow, we didn't know that. I borrowed the code from the official repository, and I agree that the terms 'W' and 'H' seem to be swapped. However, I think the operation itself works correctly because bbx1 and bbx2 are derived from size[2] (referred to as W in the code, originally H), and bby1 and bby2 are derived from size[3] (referred to as H in the code, originally W). Each bbx and bby are mapped to dim[2] and dim[3] of x correctly.

  2. Yes, the official code is from 2019, so it's outdated. Thank you for the comment. I can't believe this code is already five years old...

yewonkim01 commented 2 weeks ago

@yjyoo3312 Thank you for the clarification and the comment. So that's why I see the warning about np.int being deprecated! Now I understood. Additionally, it seems that the issue #39 that I uploaded hasn't been counted in the participation score. Could you please check that again?

yjyoo3312 commented 1 week ago

@yewonkim01 Thank you for the notification:) I changed the score in e-class regarding Issue 39, as well.