Upgrade to Pro — share decks privately, control downloads, hide ads and more …

모바일 얼굴인식 SDK 개발

kakao
December 08, 2022

모바일 얼굴인식 SDK 개발

#FacialRecognition

딥러닝 기반의 얼굴인식 모델을 처리 성능이 빈약한 모바일 및 전용장비에 적용하기 위한 최적화 방법에 대해서 공유하고자 합니다.

발표자 : andrew.js
카카오엔터프라이즈 비전인텔리전스팀의 앤드루와 포입니다. 얼굴인식을 모바일에 적용하는 일을 하고 있습니다.

po.ai
카카오엔터프라이즈 비전인텔리전스팀의 앤드루와 포입니다. 얼굴인식을 모바일에 적용하는 일을 하고 있습니다.

kakao

December 08, 2022
Tweet

More Decks by kakao

Other Decks in Programming

Transcript

  1. ݽ߄ੌ ঴ҷੋध 4%,੄ ೙ਃࢿ ҃۝ച ߂ ࢿמ ӓ؀ച ೙ਃ 

    '375,*04,ࠗ࠙ਤী ੸ਊػ ݽ؛਷ ݽ߄ੌী ੸ਊ ೞӝী ցޖ ௼׮  ޷Ҵ Ҵ݀಴ળӝࣿোҳࣗ /*45 ੄ ঴ҷ ੋध ߮؊ ߮஖݃௼ పझ౟
  2. ݽ߄ੌ ঴ҷੋध 4%,੄ ೙ਃࢿ ׮নೠ ೒ۖಬ ߂ ٣߄੉झী ੸ਊ оמ

     п ٣߄੉झо о૑Ҋ ੓ח ୭Ҋ੄ ࢿמਵ۽ ز੘ ೧ঠ ೠ׮  ৈ۞ ٣߄੉झܳ ഒ೤ ਍৔੉ оמೞ׮ (BMBYZ5BC  "OESPJE  4OBQESBHPO ઱ ਬפৡழޭפ౭  "OESPJE  *ӝ߈ /16 "QQMFJ1BE  J04  Gӝ߈ /16 (BMBYZQIPOF  BOESPJE  &YZOPT
  3. ݽ߄ੌ ঴ҷੋध 4%,੄ ೙ਃࢿ ׮নೠ ೒ۖಬ ߂ ٣߄੉झী ੸ਊ оמ

     п ٣߄੉झо о૑Ҋ ੓ח ୭Ҋ੄ ࢿמਵ۽ ز੘ ೧ঠ ೠ׮  ৈ۞ ٣߄੉झܳ ഒ೤ ਍৔੉ оמೞ׮ (BMBYZ5BC  "OESPJE  4OBQESBHPO ઱ ਬפৡழޭפ౭  "OESPJE  *ӝ߈ /16 "QQMFJ1BE  J04  Gӝ߈ /16 (BMBYZQIPOF  BOESPJE  &YZOPT
  4. ઱ਃ ٣߄੉झ߹ प೯ ࣘب GQT੿بܳ ࢲ࠺झী ਗഝೠ ࣘب۽ ࠅ ࣻ

    ੓णפ׮ ࢖ࢿ੹੗ (BMBYZ5BC 4   GQT ઱ ਬפৡழޭפ౭ 6#JP9'BDF1SFNJVN  GQT "QQMF *OD J1BE UI HFO   GQT
  5. ઱ਃ ٣߄੉झ߹ प೯ ࣘب GQT੿بܳ ࢲ࠺झী ਗഝೠ ࣘب۽ ࠅ ࣻ

    ੓णפ׮ ࢖ࢿ੹੗ (BMBYZ5BC 4   GQT ઱ ਬפৡழޭפ౭ 6#JP9'BDF1SFNJVN  GQT "QQMF *OD J1BE UI HFO   GQT
  6. ࢲߡ "1* ױ݈ "1* 4%,о ૑ਗ ೞח 1MBUGPSN $ $PSF-JC

    "OESPJE ""3-JCSBSZ J04 'SBNFXPSL-JCSBSZ 1ZUIPO .PEVMF +BWB ,PUMJO +"3-JCSBSZ ݽ߄ੌҗ ࢲߡജ҃ী ೙ਃೠ -JCSBSZઁҕ  ݽ߄ੌҗ ࢲߡ জ ࢚ഐ ਍৔੉ ੌ߈੸ ੉׮  ݽ߄ੌ জ ױة ਍৔ ҳࢿ оמ  ࢲߡ জ ױة ਍৔ ҳࢿ оמ ݽ߄ੌ জ .PCJMF"QQ ࢲߡ জ 4FSWFS"QQ
  7. ࢲߡ "1* ױ݈ "1* 4%,о ૑ਗ ೞח 1MBUGPSN $ $PSF-JC

    "OESPJE ""3-JCSBSZ J04 'SBNFXPSL-JCSBSZ 1ZUIPO .PEVMF +BWB ,PUMJO +"3-JCSBSZ ݽ߄ੌҗ ࢲߡജ҃ী ೙ਃೠ -JCSBSZઁҕ  ݽ߄ੌҗ ࢲߡ জ ࢚ഐ ਍৔੉ ੌ߈੸ ੉׮  ݽ߄ੌ জ ױة ਍৔ ҳࢿ оמ  ࢲߡ জ ױة ਍৔ ҳࢿ оמ ݽ߄ੌ জ .PCJMF"QQ ࢲߡ জ 4FSWFS"QQ
  8. ࢲߡ "1* ױ݈ "1* 4%,о ૑ਗ ೞח 1MBUGPSN $ $PSF-JC

    "OESPJE ""3-JCSBSZ J04 'SBNFXPSL-JCSBSZ 1ZUIPO .PEVMF +BWB ,PUMJO +"3-JCSBSZ ݽ߄ੌҗ ࢲߡജ҃ী ೙ਃೠ -JCSBSZઁҕ  ݽ߄ੌҗ ࢲߡ জ ࢚ഐ ਍৔੉ ੌ߈੸ ੉׮  ݽ߄ੌ জ ױة ਍৔ ҳࢿ оמ  ࢲߡ জ ױة ਍৔ ҳࢿ оמ ݽ߄ੌ জ .PCJMF"QQ ࢲߡ জ 4FSWFS"QQ
  9. ٩۞׬ ೐ۨ੐ਕ௼ %- 'SBNFXPSL 1ZUPSDI 0//9 ,FSBT 5FOTPSGMPX-JUF $POWFSUFS 5FOTPSGMPX-JUF

    *OUFSQSFUFS 5FOTPSGMPX-JUF 'PSNBU ݽ؛ ѐߊ ױ҅ ߓನ ױ҅ $PSFNMNPEFM $PSF.- $PSFNM UPPMT
  10. ٩۞׬ ೐ۨ੐ਕ௼ %- 'SBNFXPSL 1ZUPSDI 0//9 ,FSBT 5FOTPSGMPX-JUF $POWFSUFS 5FOTPSGMPX-JUF

    *OUFSQSFUFS 5FOTPSGMPX-JUF 'PSNBU ݽ؛ ѐߊ ױ҅ ߓನ ױ҅ $PSFNMNPEFM $PSF.- $PSFNM UPPMT
  11. ٩۞׬ ೐ۨ੐ਕ௼ %- 'SBNFXPSL 1ZUPSDI 0//9 ,FSBT 5FOTPSGMPX-JUF $POWFSUFS 5FOTPSGMPX-JUF

    *OUFSQSFUFS 5FOTPSGMPX-JUF 'PSNBU ݽ؛ ѐߊ ױ҅ ߓನ ױ҅ $PSFNMNPEFM $PSF.- $PSFNM UPPMT
  12. 5FOTPSGMPX-JUFܳ ݽ߄ੌ ೐ۨ੐ਕ௼۽ ࢶఖೠ ੉ਬ  -BUFODZ ࢿמ੉ જ׮ 

    ׮নೠ ߔূ٘ #BDLFOE ૑ਗ  DQV HQV OOBQJ YOOQBDL DPSFNM FUD  "SNӝ߈ Gীࢲח YOOQBDLӝ߈ CBDLFOEо જ਷ ࢿמ  ୭Ӕ੄ %FWJDFীࢲ HQV ӝ߈ ࢿמ੉ ੼੼ જই ૑Ҋ੓׮   //"1* /FVSBM/FUXPSL"1* ח উ٘۽੉٘੄ ಴ળ ݠन۞׬ झಖ੉׮  ࢚؀੸ਵ۽ ߊৌী ஂডೞ૑ ঋ׮  উ੿੸ੋ ন੗ച 2VBOUJ[BUJPO ૑ਗ  ׮নೠ ೒ۖಬ J04 "OESPJE 4FSWFS ૑ਗ ٩۞׬ ೐ۨ੐ਕ௼ %- 'SBNFXPSL
  13. 5FOTPSGMPX-JUFܳ ݽ߄ੌ ೐ۨ੐ਕ௼۽ ࢶఖೠ ੉ਬ  -BUFODZ ࢿמ੉ જ׮ 

    ׮নೠ ߔূ٘ #BDLFOE ૑ਗ  DQV HQV OOBQJ YOOQBDL DPSFNM FUD  "SNӝ߈ Gীࢲח YOOQBDLӝ߈ CBDLFOEо જ਷ ࢿמ  ୭Ӕ੄ %FWJDFীࢲ HQV ӝ߈ ࢿמ੉ ੼੼ જই ૑Ҋ੓׮   //"1* /FVSBM/FUXPSL"1* ח উ٘۽੉٘੄ ಴ળ ݠन۞׬ झಖ੉׮  ࢚؀੸ਵ۽ ߊৌী ஂডೞ૑ ঋ׮  উ੿੸ੋ ন੗ച 2VBOUJ[BUJPO ૑ਗ  ׮নೠ ೒ۖಬ J04 "OESPJE 4FSWFS ૑ਗ ٩۞׬ ೐ۨ੐ਕ௼ %- 'SBNFXPSL
  14. 5FOTPSGMPX-JUFܳ ݽ߄ੌ ೐ۨ੐ਕ௼۽ ࢶఖೠ ੉ਬ  -BUFODZ ࢿמ੉ જ׮ 

    ׮নೠ ߔূ٘ #BDLFOE ૑ਗ  DQV HQV OOBQJ YOOQBDL DPSFNM FUD  "SNӝ߈ Gীࢲח YOOQBDLӝ߈ CBDLFOEо જ਷ ࢿמ  ୭Ӕ੄ %FWJDFীࢲ HQV ӝ߈ ࢿמ੉ ੼੼ જই ૑Ҋ੓׮   //"1* /FVSBM/FUXPSL"1* ח উ٘۽੉٘੄ ಴ળ ݠन۞׬ झಖ੉׮  ࢚؀੸ਵ۽ ߊৌী ஂডೞ૑ ঋ׮  উ੿੸ੋ ন੗ച 2VBOUJ[BUJPO ૑ਗ  ׮নೠ ೒ۖಬ J04 "OESPJE 4FSWFS ૑ਗ ٩۞׬ ೐ۨ੐ਕ௼ %- 'SBNFXPSL
  15. %- ݽ؛੄ ѐࣻܳ ઴ৈۄ ੋध /FUXPSLҗ ݃झ௼ Ѩ୹ /FUXPSLਸ ా೤

     Ѣ੄ ݃झ௼ Ѩ୹ /FUXPSL ݅ఀ੄ -BUFODZਸ ੺ড ೡ ࣻ ੓঻׮  ୶о ௏झ౟о Ѣ੄ হ੉ ׮ܲ ࣘࢿٜب ୶о ೡ ࣻ ੓঻׮
  16. %- ݽ؛੄ ѐࣻܳ ઴ৈۄ ੋध /FUXPSLҗ ݃झ௼ Ѩ୹ /FUXPSLਸ ా೤

     Ѣ੄ ݃झ௼ Ѩ୹ /FUXPSL ݅ఀ੄ -BUFODZਸ ੺ড ೡ ࣻ ੓঻׮  ୶о ௏झ౟о Ѣ੄ হ੉ ׮ܲ ࣘࢿٜب ୶о ೡ ࣻ ੓঻׮
  17. /&0/ਸ ੉޷૑ ୊ܻ *NBHF1SPDFTTJOH ী ੸ਊ Image(YUV) Image(RGB) (BMBYZ4 6CJP9

    /&0/੹ N4 N4 /&0/റ N4 N4 $PMPSNPEFMDPOWFSTJPO 3PUBUF'MJQ (BMBYZ4 6CJP9 ঴ҷ ৔৉ Ѩ୹ӝ ੹  N4 N4 റ N4 N4 ঴ҷ ے٘݃௼ Ѩ୹ӝ ੹ N4 N4 റ N4 N4 ঴ҷ ਤઑ х૑ӝ ੹ N4 N4 റ N4 N4 ౠ૚ ࢤࢿӝ ੹ N4 N4 റ N4 N4 1JYFM/PSNBMJ[BUJPO    à   PS    N4ب ࣗ઺೤פ׮
  18. /&0/ਸ ੉޷૑ ୊ܻ *NBHF1SPDFTTJOH ী ੸ਊ Image(YUV) Image(RGB) (BMBYZ4 6CJP9

    /&0/੹ N4 N4 /&0/റ N4 N4 $PMPSNPEFMDPOWFSTJPO 3PUBUF'MJQ (BMBYZ4 6CJP9 ঴ҷ ৔৉ Ѩ୹ӝ ੹  N4 N4 റ N4 N4 ঴ҷ ے٘݃௼ Ѩ୹ӝ ੹ N4 N4 റ N4 N4 ঴ҷ ਤઑ х૑ӝ ੹ N4 N4 റ N4 N4 ౠ૚ ࢤࢿӝ ੹ N4 N4 റ N4 N4 1JYFM/PSNBMJ[BUJPO    à   PS    N4ب ࣗ઺೤פ׮
  19. 1JYFM/PSNBMJ[BUJPO୭੸ച ా೤ оמೠ ো࢑ਸ ޷ܻ ࣻ೯ 0GGMJOF  #BUDI /PSNBMJ[BUJPO-BZFS੄

    GVTJOHҗ ਬࢎ  2VBOUJ[BUJPOਸ Ҋ۰ೞৈ ࣗࣻ੼੉ ߊࢤೞ૑ ঋח NFBO  TUE  ਸ ࢎਊೣ ੉ ޷ ૑ QJYFM@NFBO ࡐӝ QJYFM@TUE ա־ӝ QJYFM@NFBO ࡐӝ 88TUE ੉ ޷ ૑ ೟ण җ੿ 5SBJOJOH5JNF ѐࢶ ੹ *OGFSFODF5JNF ѐࢶ റ *OGFSFODF5JNF
  20. 1JYFM/PSNBMJ[BUJPO୭੸ച ా೤ оמೠ ো࢑ਸ ޷ܻ ࣻ೯ 0GGMJOF  #BUDI /PSNBMJ[BUJPO-BZFS੄

    GVTJOHҗ ਬࢎ  2VBOUJ[BUJPOਸ Ҋ۰ೞৈ ࣗࣻ੼੉ ߊࢤೞ૑ ঋח NFBO  TUE  ਸ ࢎਊೣ ੉ ޷ ૑ QJYFM@NFBO ࡐӝ QJYFM@TUE ա־ӝ QJYFM@NFBO ࡐӝ 88TUE ੉ ޷ ૑ ೟ण җ੿ 5SBJOJOH5JNF ѐࢶ ੹ *OGFSFODF5JNF ѐࢶ റ *OGFSFODF5JNF
  21. ݽ؛ ন੗ച 2VBOUJ[BUJPO ী ੄ೠ -BUFODZ ѐࢶ ֙ ੉റ੄ ٣߄੉झীࢲח

    JOUҗ G੄ ࢿמ ର੉о ഛোೞ׮  (16ࠁ׮ب જ׮ model precision cpu xnnpack gpu nnapi Galaxy S7 f32 32.27 19.50 25.42 32.52 i8 24.89 24.68 17.38 24.63 Galaxy S10 f32 22.36 11.97 12.25 29.41 i8 14.26 15.27 13.19 16.15 Galaxy Note20 f32 12.11 9.31 7.50 14.50 i8 5.55 5.20 5.81 6.17 Galaxy S21 f32 10.36 6.95 5.43 18.51 i8 4.1 4.4 5.63 8.09 .PCJMFOFU 7੄ -BUFODZஏ੿ NJMMJ4FDPOET
  22. ݽ؛ ন੗ച 2VBOUJ[BUJPO ী ੄ೠ -BUFODZ ѐࢶ ֙ ੉റ੄ ٣߄੉झীࢲח

    JOUҗ G੄ ࢿמ ର੉о ഛোೞ׮  (16ࠁ׮ب જ׮ model precision cpu xnnpack gpu nnapi Galaxy S7 f32 32.27 19.50 25.42 32.52 i8 24.89 24.68 17.38 24.63 Galaxy S10 f32 22.36 11.97 12.25 29.41 i8 14.26 15.27 13.19 16.15 Galaxy Note20 f32 12.11 9.31 7.50 14.50 i8 5.55 5.20 5.81 6.17 Galaxy S21 f32 10.36 6.95 5.43 18.51 i8 4.1 4.4 5.63 8.09 .PCJMFOFU 7੄ -BUFODZஏ੿ NJMMJ4FDPOET
  23. ন੗ച 2VBOUJ[BUJPO ী ஘ച੸ ݽ؛ ࢸ҅ о੉٘  ֎౟ਕ௼੄ %FQUIо

    ծਸ ࣻ۾ ਬܻ  8JEUIо ևਸ ࣻ۾ ਬܻ -BZFS -BZFS -BZFS
  24. ন੗ച 2VBOUJ[BUJPO ী ஘ച੸ ݽ؛ ࢸ҅ о੉٘  ֎౟ਕ௼੄ %FQUIо

    ծਸ ࣻ۾ ਬܻ  8JEUIо ևਸ ࣻ۾ ਬܻ -BZFS -BZFS -BZFS
  25. ন੗ച 2VBOUJ[BUJPO ী ஘ച੸ ݽ؛ ࢸ҅ о੉٘  ਋ഥ҃۽ 4IPSU$POOFDUJPO

    ੉ ੓ਸ ࣻ۾ ਬܻೞ׮ -BZFS -BZFS -BZFS    
  26. ۨ੉য ࠙ೡ۽ ন੗ച ࢿמ ೞۅ ѐࢶ ୹۱ ౠࢿ੉ ׮ܲ ۨ੉য੄

    ޛܻ੸ ࠙ೡ੉ ন੗ചী ਬܻೡ ࣻ ੓׮ 1PTU5SBJOJOH4QMJU 'VMMZ$POOFDUFE weights<128x256> bias<128> 'VMMZ$POOFDUFE weights<7x128> Bias<7> 4MJDF begin<0> end<6> 4MJDF begin<6> end<7> -PHJTUJD $PODBU 'VMMZ$POOFDUFE weights<128x256> bias<128> 'VMMZ$POOFDUFE weights<6x128> Bias<6> -PHJTUJD $PODBU 'VMMZ$POOFDUFE weights<1x128> Bias<1> 변경 -128 127 -128 127 -128 127 f32 f32 f32
  27. ۨ੉য ࠙ೡ۽ ন੗ച ࢿמ ೞۅ ѐࢶ ୹۱ ౠࢿ੉ ׮ܲ ۨ੉য੄

    ޛܻ੸ ࠙ೡ੉ ন੗ചী ਬܻೡ ࣻ ੓׮ 1PTU5SBJOJOH4QMJU 'VMMZ$POOFDUFE weights<128x256> bias<128> 'VMMZ$POOFDUFE weights<7x128> Bias<7> 4MJDF begin<0> end<6> 4MJDF begin<6> end<7> -PHJTUJD $PODBU 'VMMZ$POOFDUFE weights<128x256> bias<128> 'VMMZ$POOFDUFE weights<6x128> Bias<6> -PHJTUJD $PODBU 'VMMZ$POOFDUFE weights<1x128> Bias<1> 변경 -128 127 -128 127 -128 127 f32 f32 f32
  28. ۨ੉য ࠙ೡ۽ ন੗ച ࢿמ ೞۅ ѐࢶ ୹۱ ౠࢿ੉ ׮ܲ ۨ੉য੄

    ޛܻ੸ ࠙ೡ੉ ন੗ചী ਬܻೡ ࣻ ੓׮ 1PTU5SBJOJOH4QMJU 'VMMZ$POOFDUFE weights<128x256> bias<128> 'VMMZ$POOFDUFE weights<7x128> Bias<7> 4MJDF begin<0> end<6> 4MJDF begin<6> end<7> -PHJTUJD $PODBU 'VMMZ$POOFDUFE weights<128x256> bias<128> 'VMMZ$POOFDUFE weights<6x128> Bias<6> -PHJTUJD $PODBU 'VMMZ$POOFDUFE weights<1x128> Bias<1> 변경 -128 127 -128 127 -128 127 f32 f32 f32
  29. $16*OGFSFODF 10 15 20 25 30 120 180 240 300

    Latency(ms) FLOPS(M) Lower FLOPS, Lower Latency
  30. 4MJN'BDF %FTJHO most effective receptive field most effective receptive field

    Total Capacity input output 1x 2x 4x 8x 1x 2x 4x 8x Receptive Field의 디자인이 전체 디자인의 performance를 결정
  31. 'PS$16/"4 /FVSBM"SDIJUFDUVSF4FBSDI  /"4ۆ  ઱য૓ ܻࣗझ ؘ੉ఠ కझ௼ী ୭੸ചػ

    PQFSBUJPOҗ TUSVDUVSFܳ ঌҊ્ܻਵ۽ ఐ࢝  DPNQVUBUJPOBMHSBQI੄ п OPEFীࢲ যڃ PQFSBUJPOਸ ࢎਊ೧ ׮਺ OPEF۽ ૓೯ೡ૑ Ѿ੿
  32. 'PS$16/"4 /FVSBM"SDIJUFDUVSF4FBSDI  1/" 1SPYZMFTT /FVSBM"SDIJUFDUVSF "EBQUBUJPO   TFBSDITQBDFо

    ևয૑ݶ /"4੄ ബਯ਷ хࣗ  ӝઓ IVNBOEFTJHOFENPEVMFীࢲ DPOOFDUJPO੄ ਬޖ݅ਸ TFBSDIೞৈ ࢿמ ೱ࢚ 1) D.G. Kim and H.C. Lee, "Proxyless Neural Architecture Adaptation at Once," in IEEE Access, 2022
  33. 'PS$16/"4 /FVSBM"SDIJUFDUVSF4FBSDI  1/" 1SPYZMFTT /FVSBM"SDIJUFDUVSF "EBQUBUJPO   TFBSDITQBDFо

    ևয૑ݶ /"4੄ ബਯ਷ хࣗ  ӝઓ IVNBOEFTJHOFENPEVMFীࢲ DPOOFDUJPO੄ ਬޖ݅ਸ TFBSDIೞৈ ࢿמ ೱ࢚ 1) D.G. Kim and H.C. Lee, "Proxyless Neural Architecture Adaptation at Once," in IEEE Access, 2022
  34. 'PS$16/"4 /FVSBM"SDIJUFDUVSF4FBSDI  1/" 1SPYZMFTT /FVSBM"EBQUBUJPO  CBTFMJOF ؀࠺ TLJQDPOOFDUJPOѐ

    ୶о  زੌ ো࢑۝ীࢲ ӝઓ 4MJN'BDF ؀࠺ ੋध पಁਯ  хࣗ
  35. 'PS(16/164JNQMF'BDF  4MJN'BDF ؀࠺ زੌ ۨ੉ఢदীࢲ ੋध पಁਯ  хࣗ

     4MJN'BDF ؀࠺ زੌ ࢿמীࢲ JOGFSFODFद ࣘب ߓ ૐо
  36. ,OPXMFEHF%JTUJMMBUJPO feature extractor(=model) embedding classifier logit 얼굴에 대한 정보를 추상적으로

    함축 학습 데이터의 identity를 확률 분포로 표현 knowledge to distill  ঴ҷ ੋध੄ ੹୓ ౵੉೐ۄੋীࢲ ୶୹ೡ LOPXMFEHFܳ Ѿ੿
  37. ,OPXMFEHF%JTUJMMBUJPO  UFBDIFS৬ TUVEFOU੄ ର੉о ௼ݶ TUVEFOUо ઁ؀۽ ߓ਋૑ ޅೞӝ

    ٸޙী TUVEFOUо ୽࠙൤ ழঠ ೞח ޙઁ  ؊ ֫਷ ࢿמਸ о૓ UFBDIFSࠁ׮ زੌೠ ࢿמਸ о૓ UFBDIFSܳ ࢎਊೞח Ѫ੉ ؊ જ਷ ബҗ  EJTUJMMBUJPOਸ ૓೯ೠ TUVEFOUܳ ੤ର TUVEFOU۽ ॄࢲ ৈ۞ ߣ EJTUJMMBUJPOೡ ҃਋ ࢿמ ೱ࢚ small gap similar performance distill multiple times