Giter VIP home page Giter VIP logo

Comments (9)

haydengunraj avatar haydengunraj commented on August 28, 2024

Hi Joachim,

The run_covidnet_ct.py script handles training, validation/testing and inference. As such, there is a required mode argument that should precede all other arguments, i,e,:
python run_covidnet_ct.py infer --input_height 512 --input_width 512 --auto_crop ...

One other thing to note is that the current COVIDNet-CT models take input images of size 512x512. You will get a shape-related error if you set --input_height 100 --input_width 100. These arguments are included in case we add new models with different input shapes, but for now they should be left as the default 512x512.

from covidnet-ct.

jomollin avatar jomollin commented on August 28, 2024

Hi Haydengunraj,
thanks for the quick help. I installed the new version and followed your advises, but get now a lot more errors. As I'm not very familiar with python, I need some help for just do inference with your models:

OUTPUT:
2020-09-17 08:41:19.634355: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX AVX2
2020-09-17 08:41:19.639191: I tensorflow/core/common_runtime/process_util.cc:71] Creating new thread pool with default inter op setting: 4. Tune using inter_op_parallelism_threads for best performance.
Loading meta graph from C:/covid-net/COVIDNet-CT-master/COVIDNet-CT-A\model.meta
Traceback (most recent call last):
File "c:/covid-net/COVIDNet-CT-master/run_covidnet_ct.py", line 372, in
runner.infer(args.image_file, args.auto_crop)
File "c:/covid-net/COVIDNet-CT-master/run_covidnet_ct.py", line 244, in infer
graph, sess, saver = self.load_graph()
File "c:/covid-net/COVIDNet-CT-master/run_covidnet_ct.py", line 121, in load_graph
saver = tf.train.import_meta_graph(self.meta_file)
File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\training\saver.py", line 1435, in import_meta_graph
meta_graph_or_file, clear_devices, import_scope, **kwargs)[0]
File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\training\saver.py", line 1457, in _import_meta_graph_with_return_elements
**kwargs))
File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\framework\meta_graph.py", line 806, in import_scoped_meta_graph_with_return_elements
return_elements=return_elements)
File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\util\deprecation.py", line 507, in new_func
return func(*args, **kwargs)
File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\framework\importer.py", line 399, in import_graph_def
_RemoveDefaultAttrs(op_dict, producer_op_list, graph_def)
File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\framework\importer.py", line 159, in _RemoveDefaultAttrs
op_def = op_dict[node.op]
KeyError: 'FusedBatchNormV3'

best regards
Joachim

from covidnet-ct.

jomollin avatar jomollin commented on August 28, 2024

Dear Haydengunraj,

thanks for your help. But unfortunately I run into other problems. I've downloaded the newest version. Must remark line 13 because it failed to load ConfusionMatrixDisplay.

python c:/covid-net/COVIDNet-CT-master/run_covidnet_ct.py infer --input_height 512 --input_width 512 --auto_crop --model_dir C:/covid-net/COVIDNet-CT-master/COVIDNet-CT-A --meta_name model.meta --ckpt_name model --image_file c:/test/a5ae5a83-a71d-4515-87df-6f15f691e166.jpg

gives now

2020-09-17 13:17:03.331029: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX AVX2
2020-09-17 13:17:03.332444: I tensorflow/core/common_runtime/process_util.cc:71] Creating new thread pool with default inter op setting: 4. Tune using inter_op_parallelism_threads for best performance.
Loading meta graph from C:/covid-net/COVIDNet-CT-master/COVIDNet-CT-A\model.meta
Traceback (most recent call last):
File "c:/covid-net/COVIDNet-CT-master/run_covidnet_ct.py", line 373, in
runner.infer(args.image_file, args.auto_crop)
File "c:/covid-net/COVIDNet-CT-master/run_covidnet_ct.py", line 245, in infer
graph, sess, saver = self.load_graph()
File "c:/covid-net/COVIDNet-CT-master/run_covidnet_ct.py", line 122, in load_graph
saver = tf.train.import_meta_graph(self.meta_file)
File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\training\saver.py", line 1435, in import_meta_graph
meta_graph_or_file, clear_devices, import_scope, **kwargs)[0]
File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\training\saver.py", line 1457, in _import_meta_graph_with_return_elements
**kwargs))
File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\framework\meta_graph.py", line 806, in import_scoped_meta_graph_with_return_elements
return_elements=return_elements)
File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\util\deprecation.py", line 507, in new_func
return func(*args, **kwargs)
File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\framework\importer.py", line 399, in import_graph_def
_RemoveDefaultAttrs(op_dict, producer_op_list, graph_def)
File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\framework\importer.py", line 159, in _RemoveDefaultAttrs
op_def = op_dict[node.op]
KeyError: 'FusedBatchNormV3'

from covidnet-ct.

haydengunraj avatar haydengunraj commented on August 28, 2024

Could you specify which TensorFlow version you're using? This may be due to a version mismatch.

from covidnet-ct.

jomollin avatar jomollin commented on August 28, 2024

I'm using Tensorflow 1.13.1 which is perfectly running with covid-net. Therefor I hesitate to upgrade

from covidnet-ct.

haydengunraj avatar haydengunraj commented on August 28, 2024

COVIDNet-CT has only been tested with TensorFlow 1.15, so it's difficult for me to say what the problem is. My best guess is that the FusedBatchNormV3 op in 1.15 is not supported by 1.13.1, but again this is a guess. Your best bet might be to upgrade to 1.15, as both COVID-Net and COVIDNet-CT are tested on 1.15.

from covidnet-ct.

jomollin avatar jomollin commented on August 28, 2024

I solved the problem by upgrading to Tensorflow 1.15. Perfect. You have done great work. Thank you.

I'm not very familiar with Python and looking for some help to make the inference request available as a local web service, to which I can communicate with JSON. Any idea?

from covidnet-ct.

haydengunraj avatar haydengunraj commented on August 28, 2024

I'm not too familiar with building web services, so I won't be able to help you on that end.

from covidnet-ct.

haydengunraj avatar haydengunraj commented on August 28, 2024

I'm closing this issue now, as the original problem was resolved as a version issue. The question about web services is best asked elsewhere, as issues should be limited to problems with the code, questions about the code/methodology, or potential enhancements.

from covidnet-ct.

Related Issues (20)

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.