Giter Site home page Giter Site logo

precipitation-nowcasting's People

Contributors

hzzone avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

precipitation-nowcasting's Issues

请问为什么train_label是20张图,train_data是5张?这样的话如何计算loss?

代码是训练ConvLSTM的train_and_test函数部分:

for itera in tqdm(range(1, max_iterations+1)):
        lr_scheduler.step()
        train_batch, train_mask, sample_datetimes, _ = \
            train_hko_iter.sample(batch_size=batch_size)
        train_batch = torch.from_numpy(train_batch.astype(np.float32)).to(cfg.GLOBAL.DEVICE) / 255.0
        train_data = train_batch[:IN_LEN, ...]
        train_label = train_batch[IN_LEN:IN_LEN + OUT_LEN, ...]
        mask = torch.from_numpy(train_mask[IN_LEN:IN_LEN + OUT_LEN, ...].astype(int)).to(cfg.GLOBAL.DEVICE)

Question About config.py

When I run config.py, it appears ImportError: cannot import name 'activation' from partially initialized module 'nowcasting.models.model' (most likely due to a circular import) (D:\tmx2023\mlcode\Precipitation-Nowcasting-master\nowcasting\models\model.py) Error.

input of forecaster

As each RNN block receives 2 inputs x and h(history), for the first RNN block of "decoder" (by first I mean the one shown in the image) 1. what do u input instead of history and x? 2. Is it correct to assume input=zeros and history=last output of encoder?

The reason of applying patch size to moving mnist dataset?

When I read Shi's paper "Convolutional LSTM Network: A Machine Learning:Approach for Precipitation Nowcasting", in his experiments on moving mnist dataset, he shape img data (64*64*1) to (16*16*16). I'm confused about it, is it because of gpu memory and is it appropriate of this way? Thanks!

How to concatenate spatial coordinator to input frame?

The paper said The spatial coordinates G are concatenated to the input frame to ensure the network knows the observations are from different locations, but I did not find it in your code?
Could you tell me how to do it or where to find it ?

RuntimeError: The size of tensor a (12) must match the size of tensor b (96) at non-singleton dimension 3

All parameters are default.

import torch
from nowcasting.config import cfg
from nowcasting.models.forecaster import Forecaster
from nowcasting.models.encoder import Encoder
from collections import OrderedDict
from nowcasting.models.model import EF
from torch.optim import lr_scheduler
from nowcasting.models.loss import Weighted_mse_mae
from nowcasting.models.trajGRU import TrajGRU
#from nowcasting.train_and_test import train_and_test
import numpy as np
from nowcasting.hko.evaluation import *
import copy
from experiments.net_params import *
from nowcasting.models.model import Predictor

encoder = Encoder(encoder_params[0], encoder_params[1]).to('cuda')
forecaster = Forecaster(forecaster_params[0], forecaster_params[1])
encoder_forecaster1 = EF(encoder, forecaster).to('cuda')
encoder_forecaster1(torch.randn(10, 8, 1, 64, 64).to('cuda'))

Question about training

First of all thank you so much for sharing your code.
I have a problem during training:
Why can an iteration take about 12s?

like this:
0%| | 8/100000 [01:36<336:01:47, 12.10s/it]

Is the process of loading data too time-consuming.

Hope to get your answer!
Thank you!

apply into other area (the combustion flame)

Thanks for sharing the repo. I want to use the Repo to test the prediction of combustion flame,but i haven't got the hko-77 dataset, i don't know the extract data construction. I will appreciate it if you can share me the construction of the dataset. And my e-mail is [email protected].
Thank you very much
Best,
Fresh man

The implementation of Encoder-Forecaster is wrong, it's a Seq2Seq strcucture actually.

Look at this file: Precipitation-Nowcasting/nowcasting/models/model.py:
`
class EF(nn.Module):

def __init__(self, encoder, forecaster):
    super().__init__()
    self.encoder = encoder
    self.forecaster = forecaster

def forward(self, input):
    state = self.encoder(input) # <--- look here, all communication between encoder and forecaster are the variate: state, it's not right implementation of encoder-forecaster structure
    output = self.forecaster(state)
    return output

`
For example, in encoder-forecaster structure, a cell must receive the cell states of left cell (at the same level) as input except the cell states from up/down level, but the code didn't implement it, so it's a seq2seq structure, not a encoder-forecaster structure.

Contact me for more details if the author think it's necessary: Qq: 1 0 three three one 6 1 wu wu si

Question on demo.gif

Left pictures are the ground truth sequences, and right pictures are the predicted sequences?

Question About config.py

What are the paths 'HKO_PNG_PATH' and 'HKO_MASK_PATH' in config.py used for?
Are they temporary directories and supposed to be empty before running , or supposed to be filled with some input png pictures(if so, how can I get those pictures)?
for dirs in ['/Users/hzzone/Downloads/HKO-7_data/radarPNG', '/home/hzzone/HKO-7/radarPNG']: if os.path.exists(dirs): __C.HKO_PNG_PATH = dirs

When I run python 'experiments/trajGRU_balanced_mse_mae/main.py' with those directories empty, IOError occured, details were as follow:
Traceback (most recent call last): File "experiments/trajGRU_balanced_mse_mae/main.py", line 49, in <module> train_and_test(encoder_forecaster, optimizer, criterion, mult_step_scheduler, batch_size, max_iterations, test_iteration_interval, test_and_save_checkpoint_iterations, folder_name) File "C:\Users\Dennis\Desktop\2020.10.26 radar\Precipitation-Nowcasting-master\nowcasting\train_and_test.py", line 53, in train_and_test train_hko_iter.sample(batch_size=batch_size) File "C:\Users\Dennis\Desktop\2020.10.26 radar\Precipitation-Nowcasting-master\nowcasting\hko\dataloader.py", line 453, in sample frame_dat, mask_dat = self._load_frames(datetime_clips=datetime_clips) File "C:\Users\Dennis\Desktop\2020.10.26 radar\Precipitation-Nowcasting-master\nowcasting\hko\dataloader.py", line 324, in _load_frames grayscale=True) File "C:\Users\Dennis\Desktop\2020.10.26 radar\Precipitation-Nowcasting-master\nowcasting\hko\image.py", line 115, in quick_read_frames raise IOError OSError

trajGRU的配置问题

你好师兄,请问你使用的是pretrained里面的模型吗?我想要装入自己的数据集,并且训练模型,然后输入测试的图片。请问这个具体怎么操作,麻烦了。如果方便,加我QQ:446822646

format of hko dataset

hey! first of all thanks for your implementation. what is the format of the hko dataset? I need to use your implementation for my data (sequence of images but in 11 channels) and want to predict the next sequence of frames. Is it possible with this implementation?

trajGRU如何放入测试图片,得到预测的雷达序列图片?

师兄你好,我想请问,HKO-7当中的“hko_rnn_test.py”这个是不是根据一个雷达序列图像,预测出接下来的序列图像?如果不是的话,请问下那个程序是解决这个问题的呢?其实我没太明白训练的trajGRU模型是用来做什么工作的。你能给我具体说明下吗?很感谢了。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.