This repository provides a CNN baseline (backbone from timm) for Hero Name Recognition problem in a game called League of Legends: Wild Rift (a.k.a Wild Rift).
This game is an mutiplayer online battle arena game developed by Riot Games. In the highlight moment detection systems, it is important to recognize the hero appearing on the message bar when a battle happens.
For example:
Image | Hero |
---|---|
Ahri | |
Ashe |
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
pip3 install -r requirements.txt
Put your data into the data
folder. The structure of the folder will be:
./
data/
train/
img1.jpg
img2.jpg
...
test/
img1.jpg
img2.jpg
...
This repository uses Comet ML for experiment tracking. See this for how to get started and log in with your account. Then, go to train.py and modify line 17, in the argument api_key
for your own project.
You can choose any model from timm to make the backbone. Here is resnet18
:
python3 train.py --backbone resnet18 --e 100 --b 64
Make sure the --backbone
to predict is the same as the training.
python3 predict.py --backbone resnet18 --d <path/to/test/data> --c <path/to/weight>
For quickly prediction without training, download the trained resnet18 weight here into checkpoint
folder and run:
python3 predict.py --backbone resnet18 --d data/train --c checkpoint/weight_42_3.7745168209075928.pt
Use the flag -h to see other training or inference arguments.
Nguyen Huy An
Email: anhuynguyen001@gmail.com