BossZard / rotation-yolov5

rotation detection based on yolov5
GNU General Public License v3.0
377 stars 97 forks source link

BUG? #5

Closed Lai898821381 closed 3 years ago

Lai898821381 commented 3 years ago

https://github.com/BossZard/rotation-yolov5/blob/5544637fbd79faa15c68cd345451dcf634d25a93/utils/general.py#L533

我进行DEBUG的时候,发现compute_loss里的p的shape是[batch,3,128,128,5+180+class] 但是yolov5里的是[batch,3,128,128,4+class],所以shape最后一个维度应该是4(x,y,w,h)+1(confidence)+1(angle)+class才对啊,这里的180是哪里来的,这样angle就是有180个维度了,但是应该是只有一个才对啊 输出的p应该是[batch,3,128,128,4+1+1+class] 并且ttheta = torch.zeros_like(ps[:, 5])才对吧 而不是ttheta = torch.zeros_like(ps[:, 5])

BossZard commented 3 years ago

再认真读下代码

发自我的iPhone

------------------ Original ------------------ From: Lai898821381 <notifications@github.com> Date: Tue,Jan 5,2021 6:19 PM To: BossZard/rotation-yolov5 <rotation-yolov5@noreply.github.com> Cc: Subscribed <subscribed@noreply.github.com> Subject: Re: [BossZard/rotation-yolov5] BUG? (#5)

https://github.com/BossZard/rotation-yolov5/blob/5544637fbd79faa15c68cd345451dcf634d25a93/utils/general.py#L533

我进行DEBUG的时候,发现compute_loss里的p的shape是[batch,3,128,128,5+180+class] 但是yolov5里的是[batch,3,128,128,4+class],所以shape最后一个维度应该是4(x,y,w,h)+1(confidence)+1(angle)+class才对啊,这里的180是哪里来的,这样angle就是有180个维度了,但是应该是只有一个才对啊 输出的p应该是[batch,3,128,128,4+1+1+class] 并且ttheta = torch.zeros_like(ps[:, 5])才对吧 而不是ttheta = torch.zeros_like(ps[:, 5])

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

Lai898821381 commented 3 years ago

不是很懂那个180是怎么来的,但是我看后面的代码,这个180又好像是有用的,请问这个是什么原理呢?

BossZard commented 3 years ago

参考class为什么是class_num个而不是1

发自我的iPhone

------------------ Original ------------------ From: Lai898821381 <notifications@github.com> Date: Tue,Jan 5,2021 6:24 PM To: BossZard/rotation-yolov5 <rotation-yolov5@noreply.github.com> Cc: BossZard <804072710@qq.com>, Comment <comment@noreply.github.com> Subject: Re: [BossZard/rotation-yolov5] BUG? (#5)

不是很懂那个180是怎么来的,但是我看后面的代码,这个180又好像是有用的,请问这个是什么原理呢?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

Lai898821381 commented 3 years ago

懂了 非常感谢