kamata1729 / qatm_pytorch Goto Github PK
View Code? Open in Web Editor NEWPytorch Implementation of QATM:Quality-Aware Template Matching For Deep Learning
Home Page: https://arxiv.org/abs/1903.07254
License: MIT License
Pytorch Implementation of QATM:Quality-Aware Template Matching For Deep Learning
Home Page: https://arxiv.org/abs/1903.07254
License: MIT License
Having seen your excellent code implementation, I wonder if you could share the experimental code of CoTM,DDIS and BBS?
thank you!
Dear authors,
Really appreciate your wonderful contributions, but unfortunately, I did encounter some problem while I am trying to use the project. When I tried to match my own template with my own sample picture, I get this error: "TypeError: pic should be PIL Image or ndarray. Got <class 'NoneType'>". Are there any formatting problems that might cause this issue?
Thank you so much
Can we use a pretrained resnet101 instead of vgg? If yes, which two layers' outputs do we use with 'register_forward_hook'?
ソースコードを共有していただきありがとうございます。
お伺いしたいことがあります。
デモのテンプレートマッチングはおこなうことができました。
そこで自分の画像とテンプレートでマッチングを行ったところ以下のようになりました。
詳しく見るとrun_one_sample関数下の
val = model(template, image, image_name)でvalがnanと返ってきました。
どのような原因が考えられるでしょうか。
アドバイスいただけるとありがたいです。
追加情報として
テンプレートとマッチング画像の拡張子はdemoのときと同じですが、サイズはテンプレートしかおなじではありません。
また、テンプレートはマッチング画像から切り取ったものではなく、人間の目で見てもテンプレートがマッチング画像に含まれているか判断が困難な画像を使っています。
I have tested this implementation on BBS dataset, but get poor performance, specifically, nearly zero accuracy. I wonder if you could test it and post the testing code. Thank you.
Hello, isn't this a misspelling?
qatm_pytorch.py
Line 244 dos_indices = None
dos_indices -> dots_indices used in variable name
when I run
python qatm.py -s sample/sample1.jpg -t template --cuda
Result
import qatm_pytorch.py...
define model...
calculate score...
Traceback (most recent call last):
File "qatm.py", line 46, in
scores, w_array, h_array, thresh_list = run_multi_sample(model, dataset)
File "mod.py", line 333, in run_multi_sample
File "mod.py", line 306, in run_one_sample
File "mod.py", line 150, in call
TypeError: einsum() takes 2 positional arguments but 3 were given
I would appreciate if you give me any advice~
Create README and add docker-compose
As I tested, it's much slower than NCC, and always out of memory for big images (4000*4000), any suggestion?
Dear @kamata1729 ,
I find this OSS useful and I want to use it in my software and include it in my software distribution.
In this case, can I comply with the MIT License for this?
The README states that the original code is QATM(https://github.com/cplusx/QATM) and the license can only be used by non-commercial or academic.
Is QATM_pytorch only required to comply with MIT apart from QATM?
I think below function may be always got at least one matching.
def nms(score, w_ini, h_ini, thresh=0.7):
dots = np.array(np.where(score > thresh*score.max()))
may be need change "score.max()" to a constant (0.1~0.2).
Hi,
Thank you for the code. But please test it and then post. There seems to be no matching whatsoever with any template and any image. I even tried matching template with the same image from where I made the template out....Still no matching.
How to use multiple images for the template matching?
I see that you have a function called run_multi_sample, but from thereafter, the plot doesn't seem to be the plot of each image that's processed for the templates - matching. Please clarify. I am trying to use this for multiple images not just one.
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.