Git Product home page Git Product logo

cnn-fusion's Introduction

FusionCNN

此仓库为论文 FusionCNN: a remote sensing image fusion algorithm based on deep convolutional neural networks 的开源实现。论文中提出了一种新颖的遥感图像融合算法,这种方法能够很好的保留多光谱图像的光谱信息和全色图像的空间信息。

实验图像

image 1

ms image

ms image

pan image

pan image

fusion image

fusion image

image 2

ms image

ms image

pan image

pan image

fusion image

fusion image

实验说明

训练模型

train.py用于训练模型,其中可以指定一些必要的训练参数。
对于使用的cifar数据集,需要在cifar_data_hls.py中read_data_sets中指定数据集目录。

测试模型

evaluate.py用于在测试集上评估训练好的模型。

融合图像

fusion.py中使用训练好的模型来融合遥感图像。
仓库中已经提供了一个训练好的模型,你可直接使用,可以直接运行次脚本。
如论文中所述,为了获得更好的融合质量,需要在融合之前将Pan图像进行必要的预处理(非必须),也即使用NSCT算法来对Pan进行增强,这一部分处理在matlab中进行,详细做法见论文。
模型的输入即为Pan图像(或增强后的Pan图像)和MS图像,只需指定pan_path、ms_path和save_path即可。

cnn-fusion's People

Contributors

vectorfist 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

Watchers

 avatar  avatar

cnn-fusion's Issues

错误

CNN-Fusion>python fusion.py
2022-02-25 08:26:23.012709: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'cudart64_110.dll'; dlerror: cudart64_110.dll not found
2022-02-25 08:26:23.013189: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
RuntimeError: module compiled against API version 0xe but this version of numpy is 0xd
RuntimeError: module compiled against API version 0xe but this version of numpy is 0xd
ImportError: numpy.core.multiarray_umath failed to import
ImportError: numpy.core.umath failed to import
Traceback (most recent call last):
File "F:\【密】AI-人工智能\CNN-Fusion\fusion.py", line 1, in
from fusion_model import FusionModel
File "F:\【密】AI-人工智能\CNN-Fusion\fusion_model.py", line 11, in
import tensorflow as tf
File "D:\PROG\Python\Python-3.9.10\lib\site-packages\tensorflow_init
.py", line 37, in
from tensorflow.python.tools import module_util as module_util
File "D:\PROG\Python\Python-3.9.10\lib\site-packages\tensorflow\python_init
.py", line 42, in
from tensorflow.python import data
File "D:\PROG\Python\Python-3.9.10\lib\site-packages\tensorflow\python\data_init_.py", line 21, in
from tensorflow.python.data import experimental
File "D:\PROG\Python\Python-3.9.10\lib\site-packages\tensorflow\python\data\experimental_init_.py", line 95, in
from tensorflow.python.data.experimental import service
File "D:\PROG\Python\Python-3.9.10\lib\site-packages\tensorflow\python\data\experimental\service_init_.py", line 387, in
from tensorflow.python.data.experimental.ops.data_service_ops import distribute
File "D:\PROG\Python\Python-3.9.10\lib\site-packages\tensorflow\python\data\experimental\ops\data_service_ops.py", line 23, in
from tensorflow.python.data.experimental.ops import compression_ops
File "D:\PROG\Python\Python-3.9.10\lib\site-packages\tensorflow\python\data\experimental\ops\compression_ops.py", line 16, in
from tensorflow.python.data.util import structure
File "D:\PROG\Python\Python-3.9.10\lib\site-packages\tensorflow\python\data\util\structure.py", line 22, in
from tensorflow.python.data.util import nest
File "D:\PROG\Python\Python-3.9.10\lib\site-packages\tensorflow\python\data\util\nest.py", line 36, in
from tensorflow.python.framework import sparse_tensor as _sparse_tensor
File "D:\PROG\Python\Python-3.9.10\lib\site-packages\tensorflow\python\framework\sparse_tensor.py", line 24, in
from tensorflow.python.framework import constant_op
File "D:\PROG\Python\Python-3.9.10\lib\site-packages\tensorflow\python\framework\constant_op.py", line 25, in
from tensorflow.python.eager import execute
File "D:\PROG\Python\Python-3.9.10\lib\site-packages\tensorflow\python\eager\execute.py", line 23, in
from tensorflow.python.framework import dtypes
File "D:\PROG\Python\Python-3.9.10\lib\site-packages\tensorflow\python\framework\dtypes.py", line 29, in
_np_bfloat16 = _pywrap_bfloat16.TF_bfloat16_type()
TypeError: Unable to convert function return value to a Python type! The signature was
() -> handle

关于代码

您好,我认真学习了您的代码,想训练一下自己的数据,可是我遇到几个问题,希望您能帮我解答一下:
1.我在网络模型中没有找到激活层函数,而且activation_fn(conv)这个函数的定义在哪没有找到。
2.但是我发现没有activation_fn代码也能跑通,但是loss降不下来。
希望您能帮我解答一下~谢谢

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.