Comments (13)
TypeError: deconv_length() missing 1 required positional argument: 'output_padding'.. This issue can be solved using keras=2.1.6 with python 3.6.x
from segcaps.
TypeError: deconv_length() missing 1 required positional argument: 'output_padding'.. This issue can be solved using keras=2.1.6 with python 3.6.x
If using the latest version of Keras please use output_padding=None, this seems to solve the issue
from segcaps.
Another problem is: "Too many indices for array, skipping files " , with 10 images and mask. but when i load MSCOCO data set with 10 images and mask it working.
from segcaps.
Hi hiteshnitetc,
How many channels in your mask image? It should be only one channel as gray scale images.
from segcaps.
@Cheng-Lin-Li Hello, yes my mask images are gray scale only, with channel 1, and keras is set to channel last topology
from segcaps.
I have same issue, code works fine with MSCOCO dataset, but have same error with different datasets.
from segcaps.
Hello,
I get the same issue
My configuration is : ubuntu 18.04.2, Python 3.6.7, Keras 2.2.4
The data were obtained with
python3 getcoco17.py --data_root_dir ../data --category person --annotation_file ../data/annotations/instances_train2017.json --number 10 --id 22228 178040 167494 144599 13800 147865 279422 477861 123512 69578
And then I run
python3 ./main.py --test --Kfold 2 --net segcapsr3 --data_root_dir=data --loglevel 2 --which_gpus=-2 --gpus=0 --dataset mscoco17 --weights_path data/saved_models/segcapsr3/split-0_batch-1_shuff-1_aug-0_loss-dice_slic-1_sub--1_strid-1_lr-0.0001_recon-20.0_model_20180705-092846.hdf5
thanks for your help
from segcaps.
Extract from
documentation of deconv_length line 148 and 149
https://github.com/keras-team/keras/blob/master/keras/utils/conv_utils.py
output_padding: Integer, amount of padding along the output dimension,
Can be set to None
in which case the output length is inferred
Then I introduced the following modifications in "capsule_layers.py"
ddition on line 250 output_padding = None
New 251 (was 250) out_height = deconv_length(self.input_height, self.scaling, self.kernel_size, self.padding, output_padding)
New 252 (was 252) out_width = deconv_length(self.input_width, self.scaling, self.kernel_size, self.padding, output_padding)
addition on line 284 output_padding = None
new 285 (was 283) output_shape[1] = deconv_length(output_shape[1], self.scaling, self.kernel_size, self.padding, output_padding)
new 286 (was 284) output_shape[2] = deconv_length(output_shape[2], self.scaling, self.kernel_size, self.padding, output_padding)
and it seems it works. I get 5 output masks
But I now have an other issue : "Unable to find weights path. Testing with random weights".
from segcaps.
I found the solution :
In test.py
Line 109 weights_path = join(args.data_root_dir, args.weights_path)
then data should not be repeated in weight_path => command line modified accordingly
python3 ./main.py --test --Kfold 2 --net segcapsr3 --data_root_dir=data --loglevel 2 --which_gpus=-2 --gpus=0 --dataset mscoco17 --weights_path saved_models/segcapsr3/split-0_batch-1_shuff-1_aug-0_loss-dice_slic-1_sub--1_strid-1_lr-0.0001_recon-20.0_model_20180705-092846.hdf5
from segcaps.
from segcaps.
Hi fenaux,
Thanks for your findings and suggestions.
I will revise the document and code accordingly.
from segcaps.
I get the same issue.
I solved the first problem "deconv_length() missing " using keras=2.1.6 with python 3.6.x.
But,"Too many indices for array, skipping files" still cannot be solved. Have you solved it?
from segcaps.
Getting following error.
INFO 2020-12-25 19:49:37,131:
path_to_np=data/np_files/train18.npz
INFO 2020-12-25 19:49:37,132:
Pre-made numpy array not found for train18.
Creating now...
DEBUG 2020-12-25 19:49:37,132: STREAM b'IHDR' 16 13
DEBUG 2020-12-25 19:49:37,132: STREAM b'IDAT' 41 32768
----------------------------------------------------------------------------------------------------
Unable to load img or masks for train18
too many indices for array: array is 2-dimensional, but 3 were indexed
Skipping file
from segcaps.
Related Issues (20)
- Creating MSCOCO dataset HOT 2
- What does num_atom mean?
- Instruction for running the code from .jpg files HOT 3
- bad mask HOT 1
- RuntimeError: Exception thrown in SimpleITK ReadImage: /opt/miniconda2/conda-bld/simpleitk_1546539363356/work/Code/IO/src/sitkImageReaderBase.cxx:107: sitk::ERROR: Unable to determine ImageIO reader for "data/imgs/train470.png"
- Can not load images and masks HOT 3
- Final output and raw output are always same no matter what input images are given HOT 1
- Why transformation matrix shared by different child capsule types?
- Training image and mask error HOT 4
- Did you realize the Experiments Results stated in paper of Capsules for Object Segmentation?
- RGB images with binary masks
- dependencies version
- Value Error
- ValueError: No gradients provided for any variable HOT 1
- ValueError: Dimension 0 in both shapes must be equal, but are 3 and 16.
- Proplem with deconv_length from keras.utils.conv_utils
- Iteration Time Issue
- Training Performance Do Not Improve HOT 4
- expected out_recon shape (512, 512, 1) HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from segcaps.