Git Product home page Git Product logo

tensorflow-deeplab-resnet-crf's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

tensorflow-deeplab-resnet-crf's Issues

why should the network be initialized with the input img during the procedure of inference

hello, I have read part of the source code of these project, and I find the content in the inference.py module from line 54 to line 63, and I pasts it at here as following:

Prepare image.

img_orig = tf.image.decode_jpeg(tf.read_file(args.img_path), channels=3)
# Convert RGB to BGR.
img_r, img_g, img_b = tf.split(axis=2, num_or_size_splits=3, value=img_orig)
img = tf.cast(tf.concat(axis=2, values=[img_b, img_g, img_r]), dtype=tf.float32)
# Extract mean.
img -= IMG_MEAN 

# Create network.
net = DeepLabResNetModel({'data': tf.expand_dims(img, dim=0)}, is_training=False)

However, as far as my concern, to utilize a trained model to do inference, the most common way should be like that:
(1) build the network and load the network weight param got from the previous trainning
(2)input the image for inference
anyway, according to the source code like above, the input image for inferencing was utilized as the parameter for the network initialization.
My question is, why did the input image should be utilized as a parameter for the networkinitialization, can I init the network alone without it, so as to executing the inference of this model more
efficiently(I means, initializinig the model at beginning only once, and to do the inference of several images one by one next)

Thank for your help.

No Module named pydensercf

thanks for your brilliant code! i can't find the module "pydensercf" in deeplab_resnet/utils.py . How to fix it ?

"TypeError: Expected int32, got list containing Tensors of type '_Message' instead"

I tried running train.py and I've got the following error:
Traceback (most recent call last):
File "train.py", line 187, in
main()
File "train.py", line 105, in main
coord)
File "C:\Users\Matheus\Desktop\UFRGS\Mestrado\tutorial_python\APLICACAO_A_AGRICULTURA\tensorflow-deeplab-resnet-crf-master\deeplab_resnet\image_reader.py", line 95, in init
self.image, self.label = read_images_from_disk(self.queue, self.input_size, random_scale)
File "C:\Users\Matheus\Desktop\UFRGS\Mestrado\tutorial_python\APLICACAO_A_AGRICULTURA\tensorflow-deeplab-resnet-crf-master\deeplab_resnet\image_reader.py", line 64, in read_images_from_disk
img = tf.cast(tf.concat(2, [img_b, img_g, img_r]), dtype=tf.int32)
File "C:\Users\Matheus\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\ops\array_ops.py", line 1172, in concat
dtype=dtypes.int32).get_shape().assert_is_compatible_with(
File "C:\Users\Matheus\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\framework\ops.py", line 946, in convert_to_tensor
as_ref=False)
File "C:\Users\Matheus\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\framework\ops.py", line 1036, in internal_convert_to_tensor
ret = conversion_func(value, dtype=dtype, name=name, as_ref=as_ref)
File "C:\Users\Matheus\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\framework\constant_op.py", line 235, in _constant_tensor_conversion_function
return constant(v, dtype=dtype, name=name)
File "C:\Users\Matheus\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\framework\constant_op.py", line 214, in constant
value, dtype=dtype, shape=shape, verify_shape=verify_shape))
File "C:\Users\Matheus\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\framework\tensor_util.py", line 433, in make_tensor_proto
_AssertCompatible(values, dtype)
File "C:\Users\Matheus\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\framework\tensor_util.py", line 344, in _AssertCompatible
(dtype.name, repr(mismatch), type(mismatch).name))
TypeError: Expected int32, got list containing Tensors of type '_Message' instead.

Can you help me? =(

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.