Skip to content

YichaoLu/Traffic4cast2021

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Traffic4cast2021

Data Preparation

After cloning this repo, download and extract data to the data folder, and then download and extract pre-trained weights for the Core Competition and pre-trained weights for the Extended Competition to the model folder:

|-- data
|   |-- ANTWERP
|   |-- BANGKOK
|   |-- BARCELONA
|   |-- BERLIN
|   |-- CHICAGO
|   |-- ISTANBUL
|   |-- MOSCOW
|   |-- NEWYORK
|   |-- VIENNA
|-- model
|   |-- model_1.bin
|   |-- model_2.bin
|   |-- model_3.bin
|   |-- model_4.bin
|   |-- model_5.bin
|   |-- model_6.bin
|   |-- model_7.bin
|   |-- v1_epoch_5.bin
|   |-- v2_epoch_5.bin
|   |-- v3_epoch_5.bin
|   |-- v4_epoch_5.bin
|   |-- v5_epoch_5.bin
|   |-- v6_epoch_5.bin
|   |-- v7_epoch_5.bin
|   |-- v8_epoch_5.bin
|   |-- v9_epoch_5.bin

Usage

To create a submission for the Core Challenge, run

cd core_competition
python inference_v1.py --submission_name model_v1 --checkpoint_path ../model/v1_epoch_5.bin
python inference_v2.py --submission_name model_v2 --checkpoint_path ../model/v2_epoch_5.bin
python inference_v3.py --submission_name model_v3 --checkpoint_path ../model/v3_epoch_5.bin
python inference_v4.py --submission_name model_v4 --checkpoint_path ../model/v4_epoch_5.bin
python inference_v5.py --submission_name model_v5 --checkpoint_path ../model/v5_epoch_5.bin
python inference_v6.py --submission_name model_v6 --checkpoint_path ../model/v6_epoch_5.bin
python inference_v7.py --submission_name model_v7 --checkpoint_path ../model/v7_epoch_5.bin
python inference_v8.py --submission_name model_v8 --checkpoint_path ../model/v8_epoch_5.bin
python inference_v9.py --submission_name model_v9 --checkpoint_path ../model/v9_epoch_5.bin
python submission.py

This creates a submission file named core_submission.zip under the submission folder.

To create a submission for the Extended Challenge, run

python inference.py --submission_name extended_model_v1 --checkpoint_path ../model/model_1.bin
python inference.py --submission_name extended_model_v2 --checkpoint_path ../model/model_2.bin
python inference.py --submission_name extended_model_v3 --checkpoint_path ../model/model_3.bin
python inference.py --submission_name extended_model_v4 --checkpoint_path ../model/model_4.bin
python inference.py --submission_name extended_model_v5 --checkpoint_path ../model/model_5.bin
python inference.py --submission_name extended_model_v6 --checkpoint_path ../model/model_6.bin
python inference.py --submission_name extended_model_v7 --checkpoint_path ../model/model_7.bin
python submission.py

This creates a submission file named extended_submission.zip under the submission folder.

Acknowledgements

This repository is based on NeurIPS2021-traffic4cast from the Institute of Advanced Research in Artificial Intelligence (IARAI).

If you find this repository useful, please considering citing:

@article{lu2021learning,
  title={Learning to Transfer for Traffic Forecasting via Multi-task Learning},
  author={Lu, Yichao},
  journal={arXiv preprint arXiv:2111.15542},
  year={2021}
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks