# 基于convLSTM模型的雷达图像外推算法

4 篇文章 89 订阅

### 雷达基数据解析

class Radar(object):
## path + file_name
##
def __init__(self,*args):
path,name = args
self.AbsolutePath = os.path.join(path,name)
file = open(self.AbsolutePath,'rb')
file.seek(0)
self.RawData = np.array([int(i) for i in file.read()])
self.Name = name[:-4]
self.Count = int(len(self.RawData)/2432) ## 总个数
self.RawArray = self.RawData.reshape(self.Count,2432)
_,_,_,self.Station,self.time = self.Name.split('_')[:5]

logger.info(f'ms {self.time_ms}')
#self.Julian = [self.RawArray[i][32] + self.RawArray[i][33]*256 for i in range(0,self.Count)]#儒略日
self.NumberofElevation = [self.RawArray[i][44] + self.RawArray[i][45]*256 for i in range(0,self.Count)]#层数
self.StartOfReflectivity = [self.RawArray[i][46]+self.RawArray[i][47]*256 for i in range(0,self.Count)]#起始距离
self.StartOfSpeed = [self.RawArray[i][48] + self.RawArray[i][49]*256 for i in range(0,self.Count)]
self.StepOfReflectivity = [self.RawArray[i][50] + self.RawArray[i][51]*256 for i in range(0,self.Count)]#库长
self.StepOfSpeed = [self.RawArray[i][52]+self.RawArray[i][53]*256 for i in range(0,self.Count)]
self.NumberOfReflectivity = [self.RawArray[i][54] + self.RawArray[i][55]*256 for i in range(0,self.Count)]#反射率的距离库数
self.NumberOfSpeed = [self.RawArray[i][56] + self.RawArray[i][57]*256 for i in range(0,self.Count)]
self.PointerOfReflectivity = [self.RawArray[i][64]+self.RawArray[i][65]*256 for i in range(0,self.Count)]#数据位置指针
self.PointerOfSpeed = [self.RawArray[i][66]+self.RawArray[i][67]*256 for i in range(0,self.Count)]
self.PointerOfSpectralWidth = [self.RawArray[i][68]+self.RawArray[i][69]*256 for i in range(0,self.Count)] # 谱宽指针
self.ResolutionOfSpeed = [self.RawArray[i][70]+self.RawArray[i][71]for i in range(0,self.Count)]#多普勒速度分辨率
self.vcp = [self.RawArray[i][72]+self.RawArray[i][73]*256 for i in range(0,self.Count)]# 11:降水，16；21：降水，14；31：晴空，8；32：晴空，7.
self.Elevation = [(self.RawArray[i][42]+256*self.RawArray[i][43])/8*180/4096 for i in range(0,self.Count)]#仰角
self.Azimuth = [(self.RawArray[i][36]+256*self.RawArray[i][37])/8*180/4096 for i in range(0,self.Count)]#方位角
self.Storage = self.getStorage()
#self.AllInfo = self.getAllInfo()
#self.x,self.y,self.z,self.r = self.getXyzr()
#self.space_info = self.getAllInfo()
#self.elevation_list = self.get_elevation_list()
#self.grid_data = self.grid()
file.close()

$pixel = 255 * \frac{dbz+10}{70} + 0.5$

### 算法模型

Model: "model"
_________________________________________________________________
Layer (type)                 Output Shape              Param #
=================================================================
content_input (InputLayer)   [(None, None, 64, 64, 1)] 0
_________________________________________________________________
layer1 (ConvLSTM2D)          (None, None, 64, 64, 64)  150016
_________________________________________________________________
batch_normalization (BatchNo (None, None, 64, 64, 64)  256
_________________________________________________________________
layer2 (ConvLSTM2D)          (None, None, 64, 64, 64)  295168
_________________________________________________________________
batch_normalization_1 (Batch (None, None, 64, 64, 64)  256
_________________________________________________________________
layer3 (ConvLSTM2D)          (None, None, 64, 64, 64)  295168
_________________________________________________________________
batch_normalization_2 (Batch (None, None, 64, 64, 64)  256
_________________________________________________________________
layer4 (ConvLSTM2D)          (None, None, 64, 64, 64)  295168
_________________________________________________________________
batch_normalization_3 (Batch (None, None, 64, 64, 64)  256
_________________________________________________________________
layer5 (ConvLSTM2D)          (None, None, 64, 64, 64)  295168
_________________________________________________________________
batch_normalization_4 (Batch (None, None, 64, 64, 64)  256
_________________________________________________________________
conv3d (Conv3D)              (None, None, 64, 64, 1)   1729
=================================================================
Total params: 1,333,697
Trainable params: 1,333,057
Non-trainable params: 640
_________________________________________________________________

#### 基于keras实现的网络架构代码

def Net():
contentInput = Input(shape=(None,Config.WIDTH,Config.HEIGHT,1),name='content_input')

x = BatchNormalization()(x)
x = BatchNormalization()(x)
x = BatchNormalization()(x)
x = BatchNormalization()(x)
x = BatchNormalization()(x)

model = Model(inputs=contentInput,outputs=predictions)
return model

acc：准确率

loss：logcosh值

psnr：峰值信噪比

ssim：图像相似度

POD：命中率

FAR：误警率

• 7
点赞
• 28
收藏
觉得还不错? 一键收藏
• 打赏
• 29
评论
07-20 3425
03-11 3035
12-24 1万+
01-05 1644
04-18 468
04-10 1779

### “相关推荐”对你有帮助么？

• 非常没帮助
• 没帮助
• 一般
• 有帮助
• 非常有帮助

nobrody

¥1 ¥2 ¥4 ¥6 ¥10 ¥20

1.余额是钱包充值的虚拟货币，按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载，可以购买VIP、付费专栏及课程。