Comments (17)
did you find any solution?
from keras-fcn.
i uninstalled anaconda and python and reinstalled anaconda and python 3.7
I did try to run all the files again
only two files transfer_FCN and inference is giving errors(new_1.docx)
once i fix them may be we can create HDF5 file
from keras-fcn.
when you run transfer_FCN you must write the model in the terminal, for example python transfer_FCN Vgg16 or python transfer_FCN ResNet50
and I don't know what it's the error of inference, I'm try to run train.py but I have the error of the file HDF5
from keras-fcn.
ok. but i am running the code on spyder so how do i give the command to run transfer_FCN Vgg16 or python transfer_FCN ResNet50?
are you running the same code of train.py from the keras-FCN link
from keras-fcn.
I tried in spyder and you need to go to run, configuration per file, general settings, you choose 'command line' and write Vgg16 or ResNet50
yes the same, I just change the paths to my dataset, classes and in the line of 'checkpoint_weights.hdf5 ' I wrote the file that your download of get_wieght_path and transfer_FCN
from keras-fcn.
It's normal , that is not a error, you need to wait
from keras-fcn.
when i give ResNet50 in the command line of run
runfile('C:/Users/Prisilla/Desktop/Semantics/keras_FCN/xyz/transfer_FCN.py', args='ResNet50', wdir='C:/Users/Prisilla/Desktop/Semantics/keras_FCN/xyz')
Reloaded modules: get_weight_path2, resnet_helpers2
C:/Users/Prisilla/Desktop/Semantics/keras_FCN/xyz/transfer_FCN.py:91: UserWarning: Update your Conv2D
call to the Keras 2 API: Conv2D(64, (7, 7), name="conv1", strides=(2, 2), padding="same")
x = Convolution2D(64, (7, 7), subsample=(2, 2), border_mode='same', name='conv1')(img_input)
Traceback (most recent call last):
File "", line 1, in
runfile('C:/Users/Prisilla/Desktop/Semantics/keras_FCN/xyz/transfer_FCN.py', args='ResNet50', wdir='C:/Users/Prisilla/Desktop/Semantics/keras_FCN/xyz')
File "C:\Users\Prisilla\Anaconda3\lib\site-packages\spyder\utils\site\sitecustomize.py", line 705, in runfile
execfile(filename, namespace)
File "C:\Users\Prisilla\Anaconda3\lib\site-packages\spyder\utils\site\sitecustomize.py", line 102, in execfile
exec(compile(f.read(), filename, 'exec'), namespace)
File "C:/Users/Prisilla/Desktop/Semantics/keras_FCN/xyz/transfer_FCN.py", line 148, in
func()
File "C:/Users/Prisilla/Desktop/Semantics/keras_FCN/xyz/transfer_FCN.py", line 134, in transfer_FCN_ResNet50
if index.has_key(layer.name):
AttributeError: 'dict' object has no attribute 'has_key'
from keras-fcn.
look #3 there resolve that problem
from keras-fcn.
yes . I did the same first i run get_weights_path.py and followed by transfer_FCN.py
still the above error.
from keras-fcn.
https://stackoverflow.com/questions/33727149/dict-object-has-no-attribute-has-key
says 'has_key' is removed in python 3
from keras-fcn.
File "C:/Users/Prisilla/Desktop/Semantics/keras_FCN/xyz/transfer_FCN.py", line 134, in transfer_FCN_ResNet50
if index.has_key(layer.name):
AttributeError: 'dict' object has no attribute 'has_key'
in the line 134 you need to write this code:
if layer.name in index:
index[layer.name].set_weights(weights)
from keras-fcn.
yes i did the same
and waiting for execution
will it take so long for execution
I closed everything and restarted but then it is taking long
from keras-fcn.
runfile('C:/Users/Prisilla/Desktop/Semantics/keras_FCN/xyz/transfer_FCN.py', args='ResNet50', wdir='C:/Users/Prisilla/Desktop/Semantics/keras_FCN/xyz')
Reloaded modules: get_weight_path2, resnet_helpers2
C:/Users/Prisilla/Desktop/Semantics/keras_FCN/xyz/transfer_FCN.py:91: UserWarning: Update your Conv2D
call to the Keras 2 API: Conv2D(64, (7, 7), name="conv1", strides=(2, 2), padding="same")
x = Convolution2D(64, (7, 7), subsample=(2, 2), border_mode='same', name='conv1')(img_input)
Successfully transformed!
yes ! it worked finally (transfer_FCN.py for ResNet50)
from keras-fcn.
The model is fine, but in transfer_FCN in the Vgg16 method you need to change the same code
if layer.name in index:
index[layer.name].set_weights(weights)
from keras-fcn.
yes. i did for Vgg16 and ResNet50 method
My keras version is 2.2.2, is it because of keras version . I am getting userwarning
https://groups.google.com/forum/#!topic/keras-users/BT2ZA_8kBqQ
It says input_shape may be wrong
what is the keras version. you are working?
from keras-fcn.
train.py works with small error when i run after transfer_FCN ResNet50
==================================
Total params: 23,630,741
Trainable params: 23,577,621
Non-trainable params: 53,120
Traceback (most recent call last):
File "", line 1, in
runfile('C:/Users/Prisilla/Desktop/Semantics/keras_FCN/train2.py', wdir='C:/Users/Prisilla/Desktop/Semantics/keras_FCN')
File "C:\Users\Prisilla\Anaconda3\lib\site-packages\spyder\utils\site\sitecustomize.py", line 705, in runfile
execfile(filename, namespace)
File "C:\Users\Prisilla\Anaconda3\lib\site-packages\spyder\utils\site\sitecustomize.py", line 102, in execfile
exec(compile(f.read(), filename, 'exec'), namespace)
File "C:/Users/Prisilla/Desktop/Semantics/keras_FCN/train2.py", line 233, in
label_suffix=label_suffix, ignore_label=ignore_label, label_cval=label_cval)
File "C:/Users/Prisilla/Desktop/Semantics/keras_FCN/train2.py", line 140, in train
steps_per_epoch = int(np.ceil(get_file_len(train_file_path) / float(batch_size)))
File "C:/Users/Prisilla/Desktop/Semantics/keras_FCN/train2.py", line 133, in get_file_len
fp = open(file_path)
FileNotFoundError: [Errno 2] No such file or directory: 'C:\Users\Prisilla/.keras/datasets/VOC2012/combined_imageset_train.txt'
==================================
Total params: 23,630,741
Trainable params: 23,577,621
Non-trainable params: 53,120
Traceback (most recent call last):
File "", line 1, in
runfile('C:/Users/Prisilla/Desktop/Semantics/keras_FCN/train2.py', wdir='C:/Users/Prisilla/Desktop/Semantics/keras_FCN')
File "C:\Users\Prisilla\Anaconda3\lib\site-packages\spyder\utils\site\sitecustomize.py", line 705, in runfile
execfile(filename, namespace)
File "C:\Users\Prisilla\Anaconda3\lib\site-packages\spyder\utils\site\sitecustomize.py", line 102, in execfile
exec(compile(f.read(), filename, 'exec'), namespace)
File "C:/Users/Prisilla/Desktop/Semantics/keras_FCN/train2.py", line 233, in
label_suffix=label_suffix, ignore_label=ignore_label, label_cval=label_cval)
File "C:/Users/Prisilla/Desktop/Semantics/keras_FCN/train2.py", line 140, in train
steps_per_epoch = int(np.ceil(get_file_len(train_file_path) / float(batch_size)))
FileNotFoundError: [Errno 2] No such file or directory: 'C:\Users\Prisilla/.keras/datasets/VOC2012/combined_imageset_train.txt'
from keras-fcn.
I'm using Keras 2.2.0, Tensorflor 1.8 and python 3.6
FileNotFoundError: [Errno 2] No such file or directory: 'C:\Users\Prisilla/.keras/datasets/VOC2012/combined_imageset_train.txt'
that is the direction(path) of your dataset? because maybe the script doesn't found the dataset
from keras-fcn.
Related Issues (20)
- AttributeError: 'SegDirectoryIterator' object has no attribute 'next' HOT 14
- error when run "python data_pascal_voc.py pascal_voc_setup" HOT 2
- sparse_categorical_crossentropy vs binary_crossentropy_with_logits
- in resize_images_bilinear(X, height_factor, width_factor, target_height, target_width, data_format) TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' HOT 4
- models.py HOT 2
- AttributeError: 'SegDirectoryIterator' object has no attribute 'next' HOT 4
- Comparison of models
- Dataset & start HOT 1
- Strange results from inference.py HOT 1
- reorganized for easier use
- could not read remote repository HOT 1
- I want to use my windows10 Ipython to run my datasets, but it shows an error : UnboundLocalError: local variable 'lr' referenced before assignment HOT 4
- Hello, I also have this problem, I want to train my data set, but the picture of my data set is jpg, the label is png, can I use this data set for training, if I can, I need the program What changes have been made, thank you HOT 1
- Unable to run 'train.py', the program ends directly
- Regarding the upsampling layer HOT 2
- ModuleNotFoundError: No module named 'tf_image_segmentation' HOT 3
- NameError: name 'transform_matrix_offset_center' is not defined HOT 2
- weights
- Inference gives black output
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 keras-fcn.