zhanggongjie / sam-detr Goto Github PK
View Code? Open in Web Editor NEW[CVPR'2022] SAM-DETR & SAM-DETR++: Official PyTorch Implementation
License: MIT License
[CVPR'2022] SAM-DETR & SAM-DETR++: Official PyTorch Implementation
License: MIT License
Thank you very much for your contribution!
I want to know why the Query POS Embedding in Semantically Aligner has the operation of "*0.5" before it passes through Sin POS Embedding.
SAM-DETR/models/transformer_decoder.py
Line 256 in df4e567
I look forward to your valuable reply,Thank you.
First of all, thx for your opensource code!
There are some errors with your import in attention.py
1.
if float(torch.__version__[:3]) < 1.7:
from torch._overrides import has_torch_function, handle_torch_function
else:
from torch.overrides import has_torch_function, handle_torch_function
It seems quite simple, but when torch.version returns like 1.11.0, this could lead to version error, as float(torch.version[:3]) < 1.7 will return 1.1<1.7 True.
I recommand you could split torch.version return by '.' to compare version more precisely.
2. and if pytorch version >=1.8.1
from torch.nn.modules.linear import _LinearWithBias
will lead to import error, as _LinearWithBias seems not accessable in pytorch>=1.8.1, where can be replaced by
from torch.nn.modules.linear import NonDynamicallyQuantizableLinear as _LinearWithBias
I'll appreciate it if you could add version compatability like above with this too
I'm new to cv so, forgive me if my question is easy.
After training on my own dataset, I get many .pth files in my output directory, I think it contains model parameters.
I want to know that having trained model parameters, how could I load this model to detect on 1 specific image.
That's to say, I want to give the model an image, and get back model's detection result in some format.
Thx if you could reply.
Thanks for the wonderful work.
I have seen that DN is introduced into SAM-Deter ++, but there is no corresponding disclosure code. Could you briefly describe the method if it is convenient? Can I just replace the input from the Decoder with something like a DN?
thank you
Thanks for the wonderful work.
I would like to know if SAM as a plug-in module will improve Deformable DETR?
Hi, I found that compared to other DETR variants, the q and k dimensions in SAM cross-attention use SPx8 to be higher. I would like to ask if it is fairer to compare with SPx1.
Hello. First off, thank you for making your work's code available here on GitHub. It is well organized and maintained.
My question is, since I have tried applying your SAM-DETR model to my custom object detection dataset for training and validation, I am consistently seeing the generalized_box_iou
utility function raise AssertionErrors saying the model's predicted bounding boxes are degenerate as the (lx, ly) coordinates are greater than the (rx, ry) coordinates (this check makes sense to me, however, I am not sure how to solve the issue). I have also added a check on the len(boxes1) > 0
to make sure at least one box was predicted in a batch of images.
Line 44 in aaf1936
Would you have any ideas why the model would be predicting degenerate bounding box coordinates from time to time, ending training prematurely?
Thank you for your work!
Can you please provide the GFLOPs calculation code
Thanks for the work. If only detection is used instead of both seg and det , will the mAP decrease? Can you estimate the magnitude of the decline?
hi. Can I use Swin Transformer as a backbone instead of resnet50? If so, what changes should be made to the swin transformer(pretrained on imgnet22k) ?
I want to know how the reference box works,why they can locate the object to be detected precisely?
That is important to me,thank you very much!
what means “the same embeding space”
Thanks for your great work.
When I run the code "bash scripts/r50_smca_e12_4gpu.sh", I get an error "FileNotFoundError: [Errno 2] No such file or directory: 'data/coco/train2017/000000151988.jpg'". Thus, I add one line "--eval" into "scripts/r50_smca_e12_4gpu.sh", and I run again. And I can successfully run the code. But get none results like this:
I am curious why multi-scale is not applicable, is it because of the amount of calculation?
Hello,
Thanks for your great work.
Excuse me, but I'm interested in how to get a heat map of a decoder like Figure 4 mentioned in the paper.
Can you provide a visual script?
Thank you!
Hey!It's me again, I forgot to tell u another small mistake in Data Preparation
code_root/
└── data/
└── coco/
├── train2017/
├── val2017/
└── annotations/
├── instances_train2017.json
└── instances_val2017.json
This does not seem to meet the file structure written in your code.
The correct Tree seems to be like this:
code_root/
└── data/
└── coco/
└── images/
├── train2017/
└──val2017/
└── annotations/
├── instances_train2017.json
└── instances_val2017.json
Please check it out, thx
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.