Comments (9)
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.
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.
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.
Could you specify which TensorFlow version you're using? This may be due to a version mismatch.
from covidnet-ct.
I'm using Tensorflow 1.13.1 which is perfectly running with covid-net. Therefor I hesitate to upgrade
from covidnet-ct.
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.
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.
I'm not too familiar with building web services, so I won't be able to help you on that end.
from covidnet-ct.
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)
- example code HOT 2
- COVID-Net CT-2 HOT 4
- Mark images HOT 2
- Preprocessing DICOM to PNG HOT 3
- Hyperparameter-tuning HOT 1
- Window set for prediction HOT 5
- about the dataset HOT 1
- Are the results per image only? HOT 3
- About model COVID-Net CT-2 L (2A) HOT 1
- Model implementation HOT 1
- How to train the model from scratch without using pretrained model ? HOT 1
- details workflow? HOT 1
- checkpoint file causing errors. HOT 1
- What's the batch size and epoch considered for training ? HOT 3
- TENSORFLOW 2.3.0 COMPATIBILITY HOT 1
- CT labels HOT 1
- Index error HOT 1
- Test vs Inference results for COVID sensitivity HOT 4
- missing images HOT 14
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 covidnet-ct.