kgpml / hyperspectral Goto Github PK
View Code? Open in Web Editor NEWDeep Learning for Land-cover Classification in Hyperspectral Images.
Home Page: http://kgpml.github.io/Hyperspectral/
License: GNU General Public License v3.0
Deep Learning for Land-cover Classification in Hyperspectral Images.
Home Page: http://kgpml.github.io/Hyperspectral/
License: GNU General Public License v3.0
Hi, thanks for your code. When I run the "CNN_feed"or "MLP_feed", I meet this error, and I cannot fix it. Do you know the solution?Can you help me? Thanks very much. My platform is Ubuntu 16.04, Anaconda2(python2.7), tensorflow1.0.1.
when I run Decoder_Spatial_MLP.ipynb, errors arise like "NotFoundError (see above for traceback): Unsuccessful TensorSliceReader constructor: Failed to find any matching files for model/model-MLP-1X1.ckpt-49999" . I am wondering how to solve it?
In your code- 'IndianPines_DataSet_Preparation_Without_Augmentation.ipynb', you have taken the patch size to be 1. So if my patch size is greater than 1, how will it going to work for the pixels which are on/near the boundary.
Hi,
Thank you for sharing this code, *
I want to know if you published your results or not and whether it is possible to share the paper ,?
I run your code and I get the result of the Decoder_Spatial_CNN notebook but i couldn't understand, can you explain for me please ??
Thank you for your help
Best regards
I am trying to implement Deep Learning for Land-cover Classification in Hyper spectral Images
In CNN_feed.ipynb file line number-9 run_training() function the following error encountered
UnrecognizedFlagError: Unknown command line flag 'f'
The replay will be helpful for my research
rotating the original samples by 90°, 180°and 270° and flipping the data where the original samples are
flipped along the horizontal and vertical directions can increase the number of training data. But a question is that the label should remain unchanged or changed ?
IN_PATCH = TRAIN_PATCH.reshape((-1,220,PATCH_SIZE,PATCH_SIZE))
ValueError Traceback (most recent call last)
in ()
----> 1 TRAIN_PATCH = TRAIN_PATCH.reshape((-1,220,PATCH_SIZE,PATCH_SIZE))
ValueError: cannot reshape array of size 640000 into shape (220,1,1)
Hello Dear,
i want to know the version of tensorflow, '1.1.0' cannot work now!
can you tell me where is the dataset? thank you very much!
def read_data_sets(directory,value, dtype=tf.float32): images = io.loadmat(directory)[value+'_patch'] labels = io.loadmat(directory)[value+'_labels'] data_sets = DataSet(images, labels, dtype=dtype) return data_sets
您好,在运行CNN-feed.py这个代码时遇到了问题,恳请获得帮助。
ValueError: Cannot feed value of shape (100, 24200) for Tensor 'Placeholder:0', which has shape '(100, 26620)'
Originally posted by @wjks-zxy in #1 (comment)
Hello, I just noticed a strange error while running the Decoder Spatial CNN notebook before getting into the code. I am running it with python3.5 and tensorflow 1.4. Just thought of bringing it to your notice. Specifically, the IndianPinesCNN.inference(), execution of line 70:
z = tf.nn.conv2d(x_image, weights, strides=[1, 1, 1, 1], padding='VALID')
raised the error:
InvalidArgumentError: Negative dimension size caused by subtracting 3 from 1 for 'conv_1/Conv2D' (op: 'Conv2D') with input shapes: [1,1,1,220], [3,3,220,500]
Here is the output when I run the decoder():
InvalidArgumentError Traceback (most recent call last)
/usr/lib/python3.5/site-packages/tensorflow/python/framework/common_shapes.py in _call_cpp_shape_fn_impl(op, input_tensors_needed, input_tensors_as_shapes_needed, require_shape_fn)
653 graph_def_version, node_def_str, input_shapes, input_tensors,
--> 654 input_tensors_as_shapes, status)
655 except errors.InvalidArgumentError as err:
/usr/lib64/python3.5/contextlib.py in exit(self, type, value, traceback)
65 try:
---> 66 next(self.gen)
67 except StopIteration:
/usr/lib/python3.5/site-packages/tensorflow/python/framework/errors_impl.py in raise_exception_on_not_ok_status()
465 compat.as_text(pywrap_tensorflow.TF_Message(status)),
--> 466 pywrap_tensorflow.TF_GetCode(status))
467 finally:
InvalidArgumentError: Negative dimension size caused by subtracting 3 from 1 for 'conv_1/Conv2D' (op: 'Conv2D') with input shapes: [1,1,1,220], [3,3,220,500].
During handling of the above exception, another exception occurred:
ValueError Traceback (most recent call last)
in ()
----> 1 predicted_image,predicted_results = decoder()
in decoder()
11 conv2,
12 fc1,
---> 13 fc2)
14
15 eval_correct = IndianPinesCNN.evaluation(logits, labels_placeholder)
/home/Hyperspectral-master/IndianPinesCNN.py in inference(images, conv1_channels, conv2_channels, fc1_units, fc2_units)
68 # Flattening the 3D image into a 1D array
69 x_image = tf.reshape(images, [-1,IMAGE_SIZE,IMAGE_SIZE,CHANNELS])
---> 70 z = tf.nn.conv2d(x_image, weights, strides=[1, 1, 1, 1], padding='VALID')
71 print (z)
72 h_conv1 = tf.nn.relu(z+biases, name=scope.name)
/usr/lib/python3.5/site-packages/tensorflow/python/ops/gen_nn_ops.py in conv2d(input, filter, strides, padding, use_cudnn_on_gpu, data_format, name)
395 strides=strides, padding=padding,
396 use_cudnn_on_gpu=use_cudnn_on_gpu,
--> 397 data_format=data_format, name=name)
398 return result
399
/usr/lib/python3.5/site-packages/tensorflow/python/framework/op_def_library.py in apply_op(self, op_type_name, name, **keywords)
765 op = g.create_op(op_type_name, inputs, output_types, name=scope,
766 input_types=input_types, attrs=attr_protos,
--> 767 op_def=op_def)
768 if output_structure:
769 outputs = op.outputs
/usr/lib/python3.5/site-packages/tensorflow/python/framework/ops.py in create_op(self, op_type, inputs, dtypes, input_types, name, attrs, op_def, compute_shapes, compute_device)
2630 original_op=self._default_original_op, op_def=op_def)
2631 if compute_shapes:
-> 2632 set_shapes_for_outputs(ret)
2633 self._add_op(ret)
2634 self._record_op_seen_by_control_dependencies(ret)
/usr/lib/python3.5/site-packages/tensorflow/python/framework/ops.py in set_shapes_for_outputs(op)
1909 shape_func = _call_cpp_shape_fn_and_require_op
1910
-> 1911 shapes = shape_func(op)
1912 if shapes is None:
1913 raise RuntimeError(
/usr/lib/python3.5/site-packages/tensorflow/python/framework/ops.py in call_with_requiring(op)
1859
1860 def call_with_requiring(op):
-> 1861 return call_cpp_shape_fn(op, require_shape_fn=True)
1862
1863 _call_cpp_shape_fn_and_require_op = call_with_requiring
/usr/lib/python3.5/site-packages/tensorflow/python/framework/common_shapes.py in call_cpp_shape_fn(op, require_shape_fn)
593 res = _call_cpp_shape_fn_impl(op, input_tensors_needed,
594 input_tensors_as_shapes_needed,
--> 595 require_shape_fn)
596 if not isinstance(res, dict):
597 # Handles the case where _call_cpp_shape_fn_impl calls unknown_shape(op).
/usr/lib/python3.5/site-packages/tensorflow/python/framework/common_shapes.py in _call_cpp_shape_fn_impl(op, input_tensors_needed, input_tensors_as_shapes_needed, require_shape_fn)
657 missing_shape_fn = True
658 else:
--> 659 raise ValueError(err.message)
660
661 if missing_shape_fn:
ValueError: Negative dimension size caused by subtracting 3 from 1 for 'conv_1/Conv2D' (op: 'Conv2D') with input shapes: [1,1,1,220], [3,3,220,500].
I am trying to implement Deep Learning for Land-cover Classification in Hyper spectral Images
In CNN_feed.ipynb file line number-9 run_training() function the following error encountered
ValueError: Only call sparse_softmax_cross_entropy_with_logits
with named arguments (labels=..., logits=..., ...)
Thank you in advance for your help.
Hello Dear,
So i am a phd student in MASCIR Foundation (Moroccan Foundation for Advanced Science, Innovation & Reserarch) , i work in project of hyperspectrale image classification with Deep Learnig , and search for a large Dataset of hyperspectral image and grounf thruth image , because one image of ground-thruth not enought to make a training in a Deep network ,
i look for your help to find one
i am getting this error while runnig "Decoder_Spatial_CNN.py"
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.