Coder Social home page Coder Social logo

junshengfu / semantic_segmentation Goto Github PK

View Code? Open in Web Editor NEW
105.0 5.0 41.0 66.42 MB

Semantically segment the road in the given image.

License: GNU General Public License v3.0

Python 100.00%
fully-convolutional-networks vgg16 semantic-segmentation deep-learning road-segment road-detection

semantic_segmentation's People

Contributors

junshengfu 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  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  avatar  avatar  avatar

semantic_segmentation's Issues

trained model

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!

Help Needed

Can you please provide me with you pre trained model ! i need it for a project.

Training problem

Hi,

I am trying to run training code with provided road data provided here but I am getting attached error. Please help me.

20210407_132734

Regards,
Prabhakar M

no vgg in data folder

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.

4833 test images?

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.

trained model

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.

Training problem

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.

Download the pretrained model failed.

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?

Unable to load saved model

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)'


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.