Skip to main content

A personal reimplementation of NowcastNet inference framework

Project description

NowcastNet-Rewritten

1. Introduction

This project is a personal reimplementation of the NowcastNet inference framework. The original research, titled "Skilful nowcasting of extreme precipitation with NowcastNet," by Yuchen Zhang, Mingsheng Long et al., was published in Nature and can be accessed at https://www.nature.com/articles/s41586-023-06184-4. Additionally, the original code by Yuchen Zhang is available at https://doi.org/10.24433/CO.0832447.v1.

Q: Why reimplement? A: Just for learning :)

2. Getting Started

  1. Cloning the repository:

    git clone https://github.com/VioletsOleander/nowcastnet-rewritten.git
    
  2. Install the dependencies (pick one of the following methods):

    • Sync dependencies using uv:

      uv sync
      
    • Make sure python>=3.10,<3.11, and either install from PyPI:

      pip install -U nowcastnet-rewritten
      

      or install from local:

      pip install .
      

Notes:

  • uv is recommended for managing dependencies for full reproducibility.
  • You may need to implement your own code to read the dataset. Sample code for reading the radar dataset is provided in the datasets directory.
  • To ensure compatibility with this reimplementation's architecture, weights have been modified and are available for download from Hugging Face.

3. Usage

To perform inference, run inference.py with the required arguments.

To view all available arguments, use:

python inference.py -h

It is recommended to use the --config_path option to specify the configuration file, for example:

python inference.py --config_path ../configs/inference.toml

An example configuration file is provided in the configs/ directory.

You can also specify options directly from the command line, for example:

python inference.py \
    --case_type normal \
    --device cuda:0 \
    path_to_weights \
    path_to_data \
    path_to_result

Note: If --config_path is specified, other command line options will be ignored.

4. Example Inference Result

1024 x 1024:

Inference output at 1024×1024 resolution

512 x 512:

Inference output at 512x512 resolution

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nowcastnet_rewritten-0.1.0.tar.gz (17.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nowcastnet_rewritten-0.1.0-py3-none-any.whl (21.9 kB view details)

Uploaded Python 3

File details

Details for the file nowcastnet_rewritten-0.1.0.tar.gz.

File metadata

File hashes

Hashes for nowcastnet_rewritten-0.1.0.tar.gz
Algorithm Hash digest
SHA256 8950d8cee9f1b9b64c92fa4b07014079c56fef259ede66ea0e0552c7ca5d8643
MD5 af3ccc40a0e41ae3001e69a6a5a35f9b
BLAKE2b-256 87b30e7546884ba4afc7f67617dc79ddcdedf541a605e273fe6a268c15cfbd5a

See more details on using hashes here.

File details

Details for the file nowcastnet_rewritten-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for nowcastnet_rewritten-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8ceb54270a35ee92679d8f6693a142dfeb3394eaa06b0e75c4530b61fda6fc40
MD5 0d3b714cc9d9f4917e07cba0a98c07cc
BLAKE2b-256 5df3fe9361229a54e3c083b558b952a48318c508fc921761a293172f775b6bab

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page