junshengfu / semantic_segmentation Goto Github PK
View Code? Open in Web Editor NEWSemantically segment the road in the given image.
License: GNU General Public License v3.0
Semantically segment the road in the given image.
License: GNU General Public License v3.0
Where can the shape of the output images be changed in the code?
The picture has a resolution of only 160x576 pixels.
In the README.md file, the link point of your trained model shows that this project has been deleted. Could you please update it or open source your model through other means? Thank you!
Can you please provide me with you pre trained model ! i need it for a project.
Thank you for sharing,
did you try evaluating?
When I run the code after setting training Flag to False. It gives me an error (OSError: SavedModel file does not exist at: ./data\vgg/{saved_model.pbtxt|saved_model.pb}).
When I checked data folder there is no vgg in it. Kjndly help me in this regard.
Thanks for sharing. I'm refining my implementation of FCN-VGG16 using KITTI road dataset. But I don't find there are so many test images in the test set. There are just a couple hundred of them. I tried to download the dataset again from KITTI to see if they updated it. No luck.
Do you mind to elaborate on that? Or if you get them from other places, mind to share? Thanks.
Thank you for your open source!Now i need use your trained model to test my image,but your trained model in here can't download.So please tell me what can i do.Thanks again.
I set the training_flag = True
but I got error like this:
2019-11-27 16:12:15.632003: W tensorflow/core/common_runtime/bfc_allocator.cc:424] *****************************************************************************_______________________
2019-11-27 16:12:15.649697: W tensorflow/core/framework/op_kernel.cc:1599] OP_REQUIRES failed at constant_op.cc:77 : Resource exhausted: OOM when allocating tensor of shape [7,7,512,4096] and type float
2019-11-27 16:12:15.676957: E tensorflow/core/common_runtime/executor.cc:642] Executor failed to create kernel. Resource exhausted: OOM when allocating tensor of shape [7,7,512,4096] and type float
[[{{node fc6/weights/Adam/Initializer/zeros}}]]
Traceback (most recent call last):
File "C:\Users\10806337.conda\envs\RoadSegment\lib\site-packages\tensorflow_core\python\client\session.py", line 1365, in _do_call
return fn(*args)
File "C:\Users\10806337.conda\envs\RoadSegment\lib\site-packages\tensorflow_core\python\client\session.py", line 1350, in _run_fn
target_list, run_metadata)
File "C:\Users\10806337.conda\envs\RoadSegment\lib\site-packages\tensorflow_core\python\client\session.py", line 1443, in _call_tf_sessionrun
run_metadata)
tensorflow.python.framework.errors_impl.ResourceExhaustedError: OOM when allocating tensor of shape [7,7,512,4096] and type float
[[{{node fc6/weights/Adam/Initializer/zeros}}]]
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "main.py", line 272, in
run()
File "main.py", line 222, in run
correct_label, keep_prob, learning_rate)
File "main.py", line 158, in train_nn
sess.run(tf.global_variables_initializer())
File "C:\Users\10806337.conda\envs\RoadSegment\lib\site-packages\tensorflow_core\python\client\session.py", line 956, in run
run_metadata_ptr)
File "C:\Users\10806337.conda\envs\RoadSegment\lib\site-packages\tensorflow_core\python\client\session.py", line 1180, in _run
feed_dict_tensor, options, run_metadata)
File "C:\Users\10806337.conda\envs\RoadSegment\lib\site-packages\tensorflow_core\python\client\session.py", line 1359, in _do_run
run_metadata)
File "C:\Users\10806337.conda\envs\RoadSegment\lib\site-packages\tensorflow_core\python\client\session.py", line 1384, in _do_call
raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.ResourceExhaustedError: OOM when allocating tensor of shape [7,7,512,4096] and type float
[[node fc6/weights/Adam/Initializer/zeros (defined at C:\Users\10806337.conda\envs\RoadSegment\lib\site-packages\tensorflow_core\python\framework\ops.py:1751) ]]
Original stack trace for 'fc6/weights/Adam/Initializer/zeros':
File "main.py", line 272, in
run()
File "main.py", line 218, in run
logits, train_op, cross_entropy_loss = optimize(nn_last_layer, correct_label, learning_rate, num_classes)
File "main.py", line 129, in optimize
train_op = optimizer.minimize(cross_entropy_loss)
File "C:\Users\10806337.conda\envs\RoadSegment\lib\site-packages\tensorflow_core\python\training\optimizer.py", line 413, in minimize
name=name)
File "C:\Users\10806337.conda\envs\RoadSegment\lib\site-packages\tensorflow_core\python\training\optimizer.py", line 597, in apply_gradients
self._create_slots(var_list)
File "C:\Users\10806337.conda\envs\RoadSegment\lib\site-packages\tensorflow_core\python\training\adam.py", line 131, in _create_slots
self._zeros_slot(v, "m", self._name)
File "C:\Users\10806337.conda\envs\RoadSegment\lib\site-packages\tensorflow_core\python\training\optimizer.py", line 1156, in _zeros_slot
new_slot_variable = slot_creator.create_zeros_slot(var, op_name)
File "C:\Users\10806337.conda\envs\RoadSegment\lib\site-packages\tensorflow_core\python\training\slot_creator.py", line 190, in create_zeros_slot
colocate_with_primary=colocate_with_primary)
File "C:\Users\10806337.conda\envs\RoadSegment\lib\site-packages\tensorflow_core\python\training\slot_creator.py", line 164, in create_slot_with_initializer
dtype)
File "C:\Users\10806337.conda\envs\RoadSegment\lib\site-packages\tensorflow_core\python\training\slot_creator.py", line 74, in _create_slot_var
validate_shape=validate_shape)
File "C:\Users\10806337.conda\envs\RoadSegment\lib\site-packages\tensorflow_core\python\ops\variable_scope.py", line 1504, in get_variable
aggregation=aggregation)
File "C:\Users\10806337.conda\envs\RoadSegment\lib\site-packages\tensorflow_core\python\ops\variable_scope.py", line 1247, in get_variable
aggregation=aggregation)
File "C:\Users\10806337.conda\envs\RoadSegment\lib\site-packages\tensorflow_core\python\ops\variable_scope.py", line 567, in get_variable
aggregation=aggregation)
File "C:\Users\10806337.conda\envs\RoadSegment\lib\site-packages\tensorflow_core\python\ops\variable_scope.py", line 519, in _true_getter
aggregation=aggregation)
File "C:\Users\10806337.conda\envs\RoadSegment\lib\site-packages\tensorflow_core\python\ops\variable_scope.py", line 937, in _get_single_variable
aggregation=aggregation)
File "C:\Users\10806337.conda\envs\RoadSegment\lib\site-packages\tensorflow_core\python\ops\variables.py", line 258, in call
return cls._variable_v1_call(*args, **kwargs)
File "C:\Users\10806337.conda\envs\RoadSegment\lib\site-packages\tensorflow_core\python\ops\variables.py", line 219, in _variable_v1_call
shape=shape)
File "C:\Users\10806337.conda\envs\RoadSegment\lib\site-packages\tensorflow_core\python\ops\variables.py", line 197, in
previous_getter = lambda **kwargs: default_variable_creator(None, **kwargs)
File "C:\Users\10806337.conda\envs\RoadSegment\lib\site-packages\tensorflow_core\python\ops\variable_scope.py", line 2523, in default_variable_creator
shape=shape)
File "C:\Users\10806337.conda\envs\RoadSegment\lib\site-packages\tensorflow_core\python\ops\variables.py", line 262, in call
return super(VariableMetaclass, cls).call(*args, **kwargs)
File "C:\Users\10806337.conda\envs\RoadSegment\lib\site-packages\tensorflow_core\python\ops\variables.py", line 1688, in init
shape=shape)
File "C:\Users\10806337.conda\envs\RoadSegment\lib\site-packages\tensorflow_core\python\ops\variables.py", line 1818, in _init_from_args
initial_value(), name="initial_value", dtype=dtype)
File "C:\Users\10806337.conda\envs\RoadSegment\lib\site-packages\tensorflow_core\python\ops\variable_scope.py", line 906, in
partition_info=partition_info)
File "C:\Users\10806337.conda\envs\RoadSegment\lib\site-packages\tensorflow_core\python\ops\init_ops.py", line 114, in call
return array_ops.zeros(shape, dtype)
File "C:\Users\10806337.conda\envs\RoadSegment\lib\site-packages\tensorflow_core\python\ops\array_ops.py", line 2361, in zeros
output = fill(shape, constant(zero, dtype=dtype), name=name)
File "C:\Users\10806337.conda\envs\RoadSegment\lib\site-packages\tensorflow_core\python\ops\array_ops.py", line 171, in fill
result = gen_array_ops.fill(dims, value, name=name)
File "C:\Users\10806337.conda\envs\RoadSegment\lib\site-packages\tensorflow_core\python\ops\gen_array_ops.py", line 3602, in fill
"Fill", dims=dims, value=value, name=name)
File "C:\Users\10806337.conda\envs\RoadSegment\lib\site-packages\tensorflow_core\python\framework\op_def_library.py", line 793, in _apply_op_helper
op_def=op_def)
File "C:\Users\10806337.conda\envs\RoadSegment\lib\site-packages\tensorflow_core\python\util\deprecation.py", line 507, in new_func
return func(*args, **kwargs)
File "C:\Users\10806337.conda\envs\RoadSegment\lib\site-packages\tensorflow_core\python\framework\ops.py", line 3360, in create_op
attrs, op_def, compute_device)
File "C:\Users\10806337.conda\envs\RoadSegment\lib\site-packages\tensorflow_core\python\framework\ops.py", line 3429, in _create_op_internal
op_def=op_def)
File "C:\Users\10806337.conda\envs\RoadSegment\lib\site-packages\tensorflow_core\python\framework\ops.py", line 1751, in init
self._traceback = tf_stack.extract_stack()
Is there any problem with the code? Or just the problem of my machine?
Thanks.
I'm very new in python. How can I load model for use with my own video, please?
The pre-trained model described in the Readme.md is based on Dropbox. However, when I try to download it, the downloading process is killed at 40%/100%. The notice message is: "Failed! The resource is disabled to download! ". Could you please update the pre-trained model resource?
Hello,
I cloned and followed the instructions, and put the saved model as specified.
Tried predicting images, and it crashes. Any ideas?
Restored the saved Model in file: ./model/model.ckpt
Predicting images...
Traceback (most recent call last):
File "main.py", line 266, in <module>
predict_images(test_data_path, print_speed=True)
File "main.py", line 246, in predict_images
helper.pred_samples(runs_dir, test_data_path, sess, image_shape, logits, keep_prob, input_image, print_speed)
File "/storage/git/semantic_segmentation/helper.py", line 203, in pred_samples
for name, image, speed_ in image_outputs:
File "/storage/git/semantic_segmentation/helper.py", line 175, in gen_output
{keep_prob: 1.0, image_pl: [image]})
File "/storage/anaconda3/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 905, in run
run_metadata_ptr)
File "/storage/anaconda3/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1113, in _run
str(subfeed_t.get_shape())))
ValueError: Cannot feed value of shape (1, 576, 160, 4) for Tensor 'image_input:0', which has shape '(?, ?, ?, 3)'
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.