Phonnoを理想の姿に近づけていく - #daiizメモ ã®è£å¼·ã¡ã¢ã§ããæªæ¥ã®èªåã®ããã®è¨è¨ã¡ã¢ã2025å¹´1æãã¼ã¸ã§ã³ã
é¡ä¼¼åº¦é ã«ã½ã¼ãæ¸ã¿ã®similarImages
ãä¸ããããã¨ããã¡ããã©ããå¼±ãã®é¢é£åº¦åãã®ç»åãã²ã¨ã¤é¸å®ããããã®æ°å¼ãseedImageIds
ã¯ãåºæ¬çã«ã試è¡åæ°tã«å¯¾ããå¢å é¢æ°ã
similarImages.splice(0, skipLen); const idx = Math.floor(Math.random() * similarImages.length) const similarImage = similarImages[idx];
å¼±ãé¡ä¼¼ç»åã®åå¾: æ¢ç´¢åæã¯å¤æ§æ§ãéè¦ãï¼è¨±ãéãæå³çã«é ãã«é£ã°ãï¼ã試è¡ãé²ãã«ã¤ãã¦é¡ä¼¼åº¦ãéè¦ããæ¦ç¥ã§é¡ä¼¼ç»åãåå¾ãããã®ã§ããã
similarImages
ãªã¹ãã¯é¡ä¼¼åº¦é ã«ã½ã¼ãããã¦ãããå
é æ°ä»¶ã¯é¡ä¼¼åº¦åããå¼·ããããæ¢ç´¢åæ段éã§ã¯skipLen
ã«ãã£ã¦æå³çã«é¤å»ãããã
ããã¯ãæ¢ç´¢ã®åæã«é¡ä¼¼åº¦ã®é«ãç»åã«åãã®ãé¿ããããå¤æ§ãªç»åãæ¢ç´¢ããããã§ããã
skipLen
ã¯æ¸è¡°é¢æ°ã¨ãã¦æ©è½ããseedImageIds
*1ã®ãµã¤ãºã大ãããªãã«ã¤ãã¦å¾ã
ã«å°ãããªãã
ãLoad similarããã¿ã³ã®ç¹°ãè¿ãå®è¡ãé²ã¿ seedImageIds
ãæé·ããã«ã¤ã㦠skipLen
ãæ¸å°ããå
é é¤å»ãããç»åã®æ°ãæ¸ããã¨ã§ãå¾ã
ã«é¡ä¼¼åº¦ã®é«ãç»åãé¸æè¢ã«å
¥ãããã«æ¢ç´¢ç¯å²ã調æ´ããããç¾å®çãªè©¦è¡åæ°ã®ç¯å²ã«ããã¦ã¯ãskipLen
㯠4 ~ 5 ã«åæããããã«ãã¦ãããsimilarImages
ã®é·ãã¯15 ~ 20ã§ããã
similarImages
ããã¯ç»åãã©ã³ãã ã«é¸æããããããã¯ãã¹ãããå¦çã«ãã£ã¦çµãè¾¼ã¾ããé¡ä¼¼ç»å群ãããããã«ã©ã³ãã æ§ãåãå
¥ãããã¨ã§ãåã«å¤æ§æ§ãé«ããã ãã§ãªãã以ä¸ã®ãããªå¹æãæã¤ããã§ããã
- å±æ解ããã®è±å´: ã©ã³ãã é¸æã«ãããæ¢ç´¢ãå±æçãªé¡ä¼¼ç»å群ã«åºå®ããããã¨ãé²ããããåºãç¯å²ã®ç»å空éãæ¢ç´¢ããæ©ä¼ãå¢ããã
- æ¢ç´¢ã®æºããã¨å¾©å¸°: ãã¨ããã試è¡ã§æå³çã«ã·ã¼ãç»åããé ãç»åãé¸æãããã¨ãã¦ãã次以éã®è©¦è¡ã«ãããã©ã³ãã é¸æã«ãã£ã¦ã確ççã«ã·ã¼ãç»åã«è¿ãç»åãåã³é¸æãããå¯è½æ§ããããæ¢ç´¢ã大ããé¸è±ããå ´åã§ãè»éä¿®æ£ãæå¾ ã§ããã
- å¶çºçãªçºè¦ã®ä¿é²: æå³çã«ã©ã³ãã æ§ãåãå ¥ãããã¨ã§ãéçºè ãäºæ¸¬ãã¦ããªãã£ãæå¤ãªé¡ä¼¼ç»åããæ°ããè¦ç¹ãããããç»åã®çºè¦ã«ç¹ããå¯è½æ§ãããã
- éå°ãªæé©åã®æå¶: 常ã«æãé¡ä¼¼åº¦ã®é«ãç»åã°ãããé¸æãç¶ããã®ã§ã¯ãªããã©ã³ãã æ§ã«ãã£ã¦å¤å°ã®ãã¤ãºãå ãããã¨ã§ãéå°ãªæé©åãé²ããããæ±ç¨çãªæ¢ç´¢ãä¿ãå¹æãæå¾ ã§ããã
skipLen æ¸è¡°ã®éç¨ï¼è©¦è¡åæ°ã¨ seedImageIds.length ã®å¤åãæéã®å ´åã®æ¨ç§»*3
試è¡åæ° (t) | skipLen | seedImageIds.length |
---|---|---|
4 | 7 | 25 |
9 | 6 | 55 |
25 | 5 | 151 |
68 | 4 | 409 |
183 | 3 | 1099 |
497 | 2 | 2983 |
1351 | 1 | 8107 |
3671 | 0 | 22027 |