junnytwice4528
@junnytwice4528
Reviews Written
1
Average Rating
5.0
Posts
Q&A
Train์์ GT๋ฐ์ดํฐ๋ค์ Annotation์ด ์ด๋ป๊ฒ ๊ฐ ํผ์ฒ๋งต์ ๊ฑฐ์น ๊ฐ๋ค์ ์ ์ฉ๋๋์ง ๊ถ๊ธํฉ๋๋ค!
์์ธํ ์ค๋ช ๊ฐ์ฌ๋๋ฆฝ๋๋ค! ์ถ๊ฐ์ ์ผ๋ก ๋ง์ํด์ฃผ์ layers.py์์ bbox_transform_inv() ๋ถ๋ถ์ด ์ ๋ชจ๋ฅด๊ฒ ์ด์ ์ค๋ช ํ ๋ฒ ๋ถํ๋๋ฆฝ๋๋ค! def bbox_transform_inv(boxes, deltas, scale_factors=None): cxa = (boxes[..., 0] + boxes[..., 2]) / 2 cya = (boxes[..., 1] + boxes[..., 3]) / 2 wa = boxes[..., 2] - boxes[..., 0] ha = boxes[..., 3] - boxes[..., 1] ty, tx, th, tw = deltas[..., 0], deltas[..., 1], deltas[..., 2], deltas[..., 3] if scale_factors: ty *= scale_factors[0] tx *= scale_factors[1] th *= scale_factors[2] tw *= scale_factors[3] w = tf.exp(tw) * wa h = tf.exp(th) * ha cy = ty * ha + cya cx = tx * wa + cxa ymin = cy - h / 2. xmin = cx - w / 2. ymax = cy + h / 2. xmax = cx + w / 2. return tf.stack([xmin, ymin, xmax, ymax], axis=-1) ์ด ๋ถ๋ถ์ด ์ ๊ฐ ๋ณด๊ธฐ์ ์์ ๋ ์๋ ค์ฃผ์ BBox Regression๊ณผ ์ ์ฌํด ๋ณด์ฌ์์. ๊ฐ head layer์์ feature map ๋ณ grid ํํ๋ก ์ขํ๋ฅผ ์ ํ๋ ๊ฒ ๊ฐ๊ณ , ์ด ๋ง์์ด bbox์ขํ๋ค์ ๊ฐ๋ณ feature map ์ grid ํํ์ ๋ฐ๋ฅธ ์ขํ๋ก ๋ณํํด์ค๋ค๋ ๊ฒ์ผ๋ก ํด์ํ๋ฉด ๋ ๊น์?? ๋ง์ง๋ง์ผ๋ก ํ๋๋ง ๋ ์ง๋ฌธ๋๋ฆฝ๋๋ค common.py์์ def preprocess_group_entry(self, image, annotations): ์ฌ๊ธฐ์ annotation์ scale ๊ฐ์ผ๋ก ์กฐ์ ํ๋ ๊ฒ ์ธ์ ํผ์ฒ๋งต์ ๋ฐ๋ฅธ annotation ์กฐ์ ์ ์ฐพ๊ธฐ ์ด๋ ค์ด ๊ฒ ๊ฐ์์ ํน์ ์ด๋ค ํจ์๋ค์ ์กฐํฉํ๋๊ฑด์ง ์๋ ค์ฃผ์ค ์ ์์ผ์ ๊ฐ์? ์ ๊ฐ ์ฝ๋๋ณด๋๊ฒ ์ต์์น ์์์ ใ ใ ์ ์ญ๋์ผ๋ก๋ ์๊ธฐ ํ๋ค์ด์ ์ด๋ ๊ฒ ๋ถํ๋๋ ค์!
- 0
- 2
- 287
Q&A
Neck์์ Head ๋ถ๋ถ์ ์ฐ๊ฒฐํ ๋ ์ด๋ค ์ฐ์ฐ์ ๊ฑฐ์น๋์ง ๊ถ๊ธํฉ๋๋ค!
์ ๊ฐ ์ง๋ฌธ์ ์ ๋ชป ๋๋ฆฐ ๊ฒ ๊ฐ๋ค์ใ ใ ์ ๊ฐ ๊ถ๊ธํ๋ ๋ถ๋ถ์ BI-FPN์ ๊ฑฐ์น๊ณ ์๋ก ๋ค๋ฅธ ์ฌ์ด์ฆ์ 5๊ฐ์ง ์ต์ข ํผ์ฒ๊ฐ์ด ๋์ค๋๋ฐ ์ด๋ค์ด Class Prediction๊ณผ Box Prediction์ผ๋ก ํต๊ณผ ๋ ๋ ์ด๋ค ์์ผ๋ก ํฉ์ณ์ง๋์ง์์ต๋๋ค. ํฌ๊ธฐ๊ฐ ๋ค๋ฅธ 5๊ฐ์ง์ ํผ์ฒ๋ค์ด ์ ์ํ๋ง ํน์ ๋ค์ด์ํ๋ง์ผ๋ก ํฌ๊ธฐ๋ฅผ ๊ฐ๊ฒํ๊ณ ํฉ์ณ์ง๋ ๊ฒ์ธ์ง.. https://github.com/xuannianz/EfficientDet/blob/030fb7e10ab69a297c7723120c2d1be856a852c0/model.py#L305 ์ฌ๊ธฐ 174 line์์ return P3_out, P4_td, P5_td, P6_td, P7_out ๋ผ๊ณ ๋์ค๋๋ฐ ๊ทธ ๋ค์ ์ด๋ป๊ฒ ๋๋์ง ์ฐพ๊ธฐ๊ฐ ํ๋๋ค์ใ ใ ํน์ ์ฒจ๋ถํด์ฃผ์ ๊นํ ์ฝ๋์์ (https://github.com/google/automl/blob/5b2b61005c54efe72f97cf7d0e924afed6a62a60/efficientdet/tf2/efficientdet_keras.py) 700 line์ FPNCells ๊ฐ ๊ด๋ จ๋ ๋ด์ฉ์ธ๊ฐ ์ถ๊ธฐ๋ ํฉ๋๋ค๋ง... ๋ต๋ณ ๋ถํ๋๋ฆฝ๋๋คใ ใ ๊ท์ฐฎ๊ฒ ํด๋๋ ค์ ์ฃ์กํฉ๋๋ค..
- 0
- 2
- 177




