How I parsed League of Legends

Hello, Habr!





Today I dare to tell you how I happened to extract data directly from video recordings of League of Legends tournament games using deep neural networks: why is it needed, what architectures and techniques were used, and what difficulties I encountered.





Step 0: figuring out what's what

League of Legends ( LoL ) is a popular MOBA game with a monthly audience of over 100 million players worldwide. LoL was developed by Riot Games and released back in 2009.





Riot Games . , , - . - . ...





Screenshot of a Continental League match stream.  LCL Summer Split 2020.
. LCL 2020.

HUD- (Heads-Up Display - ). :





  1. ( ) - , , : , - - , - , , .





  2. ( ) - , - . , .





  3. - ( ) - -, , . - , , .





  4. ( ) - , , : K/D/A (Kills/Deaths/Assists), - , .





1:

  1. . CVAT , . , , .. (Google OCR, Yandex OCR) , (Tesseract OCR, EasyOCR).





  2. () . segmentation-based . Unet c efficientnet instance : ( ), ( ) - ( ). segmentation_models.pytorch. Pytorch Lightning .





  3. , watershed . . SVHN , multihead . , ( ), RNN . , 11- (11- , ) . , . Pytorch .





  4. , . .. . : 2D . , , , . 3D , , N , N+1.





  5. : , , , , .





Multihead OCR architecture
Multihead OCR
- ?

, , . () . , - , :/





2:

  1. , : ( ), ( ), ( ). Unet .





  2. : - . . HSV ( ) : . : ( ) . x- , - / . , , , .





  3. ( ). , . , multihead . , , (/ ).





  4. , , , , . , (, - LoL) . , , 20- 20- . , 20-, 100 , argmax ( , ).





  5. . . , , , . - , OOD (Out-of-Domain), , , metric learning. . - - hinge-loss hard-negative triplet , .





?

, , , , . visual cortex.





hinge-loss- ?

. , .. pattern recogntion. pattern recogntion , .





3: -

  1. , - . Farza ( ) Yolo, , . , .





  2. Yolo - anchor-based , . segmentation-based . . : ( ), ( ). instance , , .





  3. Unet.





  4. watershed . , . , , . , .





  5. , . -.





N:

, , , Riot Games. , , , .





I would also like to apologize for not providing the source code of the resulting framework and omitting some points of training networks.





Thanks for attention!








All Articles