The competition "AICV-115M Challenge" is a Covid-19 couch detect contest attracting 168 competitors.
We, team đi thi
finished at Top 3 to the AUC score around 0.92 (precisely 0.921527). Subsequently, we intend to share our whole solution working on the competition. The reporting materials can be found at reports/
.
Figure 1. Our best score (AUC 0.921527)
Figure 2. The final standings (our result was just 0.01 less the winner and runner-up team)
- 1. Development environment and libraries
- 2. The structures of the repository
- 3. Training and prediction
- 4. For tesing with your own audio
- 5. API
- 6. Frontend
- 7. Acknowledge
- 8. Dataset license
- 9. License
Environment needed is Python 3.X (https://www.python.org/) or just using Google colab (https://colab.research.google.com/).
List of necessary stored in requirements.txt
. For installing, open commandline (Command Prompt, Terminal, ...) and type the following codes (if using Google colab, skip this step):
pip install -r requirements.txt
For personal local environment, we suggest creating a virtual environment to avoid unwanted conflicts (https://docs.python.org/3/tutorial/venv.html).
After installing the libraries listed in requirements.txt
, the API is ready for use.
For using frontend, the Node.js (https://nodejs.org/en/download/) need setting up. Then, install vue-cli to compiling the host:
npm i
aicovidvn115m
│ LICENSE
| main.py
│ README.md
│ requirements.txt
| submission.ipynb
│
└───data/ - dataset and its information
│ │ extra/ - 20 audio files collected from aicv115m_extra_public_1235samples provided by the organizers
│ | private/ - 1627 testing audio files
| | private_features/ - features extracted from private/
| | train/ - 4505 raw training audio files
| | train_features/ - features extracted fromtrain/
| | ...
└───modules/ - source codes for developing the model
| | __init__.py
│ │ ...
│
└───report/ - solution report, slides and related images
| | report.pdf
| | ranking.jpg
│ │ ...
│
└───src/ - source codes of api backend and frontend
│ └───backend/
| | | manage.py - executive file to build backend
│ | frontend/
└───weights/ - trained models
│ │ modles/ - 100 trained models
│ │ scalers/ - 4 scaler using for scale the features
│
In order to train the model, go inside directory modules
and type:
python train.py
P/s: when training, the new trained models are also stored in weigths/models/
. The directory for storing new trained models should be modified if needed.
Inside directory modules
:
python predict.py
Prediction result saved in modules/results.csv
.
By default, our model is used for predicting main.py
.
python main.py -f audio_file_name
audio_file_name
file name or a directory to an audio file. File required format is .wav
.
We developed a simple API with Django. In order to build the host server run the following codes inside src/backend/
:
python manage.py runserver
Default host built at IP loopback 127.0.0.1
, port 8000
(http://127.0.0.1.8000/). As usual, the loopback should be localhost
, so the IP address can be replaced by localhost
.
Endpoint to use API is set up at api/predict/
with method POST. Simply, we did not take care of security as CSRF, CORS. The audio file is sent by form with the name "audio"
. The result saved in JSON file:
{
"prob": 0.123456789
}
Figure 3. API tesing using Postman
For getting started, make sure to have API host server (previous step).
Then, start frontend by run the below codes in directory src/frontend/
:
npm run serve
The default host address at http://localhost:8080/.
The API address where frontend set up is the same as API. If changing the API address, it has to be synced with frontend address in src/frontend/src/App.vue
, line 74.
The executing time is around 15s for mid-level hardware.
Figure 4. Frontend experience
The result is highlighted by color scale from red to green (red: at high risk, green: safe).
We'd like to give many thank you to the organizers of AICovidVN 115 Challenge. This competition help students like us contribute our little things to public community and gain lots of valuable experience. The pure goal of competition is to develop a solution supporting community to fight against Covid-19, we sincerely have a chance to contribute our solution to the community.
The dataset in data/
owned by "AICV-115M Challenge", for more details, Terms and Conditions.
MIT.