timy90022 / one-shot-object-detection Goto Github PK
View Code? Open in Web Editor NEWImplementation of One-Shot Object Detection with Co-Attention and Co-Excitation in Pytorch
License: MIT License
Implementation of One-Shot Object Detection with Co-Attention and Co-Excitation in Pytorch
License: MIT License
@timy90022
Hello, tks for sharing a great work.
Iam in the very first steps to run your model. But Iam stuck in compiling part.
Iam having this error:
Iam using windows 10, cuda 9.0, cudnn 7.0.5, pytorch 1.0.1
I see that the source code of pycocotools in other places contains the parameter ioutype (such as "bbox"). Why is there no such parameter in the code here
Hi, thanks for your contribution first.
Now I face some trouble when run this project. The following is the error log:
loading annotations into memory...
Done (t=16.83s)
creating index...
index created!
No reference file.
Traceback (most recent call last):
File "trainval_net.py", line 195, in <module>
seen=args.seen)
File "/data/One-Shot-Object-Detection/lib/roi_data_layer/roidb.py", line 165, in combined_roidb
imdb, roidb, query, reserved = get_roidb(s, training)
File "/data/One-Shot-Object-Detection/lib/roi_data_layer/roidb.py", line 147, in get_roidb
imdb = get_imdb(imdb_name)
File "/data/One-Shot-Object-Detection/lib/datasets/factory.py", line 67, in get_imdb
return __sets[name]()
File "/data/One-Shot-Object-Detection/lib/datasets/factory.py", line 37, in <lambda>
__sets[name] = (lambda split=split, year=year: coco(split, year))
File "/data/One-Shot-Object-Detection/lib/datasets/coco.py", line 92, in __init__
assert False
AssertionError
I found associated code line is like following:
coco_name = image_set + year # e.g., "val2014"
self._data_name = (self._view_map[coco_name]
if coco_name in self._view_map
else coco_name)
# Dataset splits that have ground-truth annotations (test splits
# do not have gt annotations)
self._gt_splits = ('train', 'val', 'minival')
# set reference file
self._reference_dir = os.path.join(cfg.DATA_DIR, "coco_reference_image")
self._reference_file = os.path.join(self._reference_dir,
"coco_{}_e2e_mask_rcnn_R_101_FPN_1x_caffe2.pkl".format(
self._data_name))
if not os.path.exists(self._reference_file): # ! error occur !
print('No reference file.')
assert False
else:
with open(self._reference_file, "rb") as f:
self.reference_image = pickle.load(f)
What coco_{}_e2e_mask_rcnn_R_101_FPN_1x_caffe2.pkl
means? Could you tell me how to fix this issue?
Thanks!
Hi, thanks for your work at first.
But when I reimplement your results, I faced some errors.
After I clone the repo, I run the command :
python setup.py build develop
My envirionment is python3.7 and PyTorch1.1.
Then, when I run the code, there is some errors:
ImportError: cannot import name '_mask' from 'pycocotools' (/home/xyang/Code/practical/Few-shot/One-Shot-Object-Detection/lib/pycocotools/__init__.py)
I don't know if I need to run the setup.py with py2?
I am a beginner. I am comfuse which dataset should I use?(COCO 2014 or 5K minival?). And need I install the pycocotools ? thaks!!!!!!!
hello,sir. I folllowed the README to compile the project and download the pretrianed model, when I run command python test_net.py --s 2 --g 2 --a 4 --cuda
, there are some errors when evaluating detection result:
Loading and preparing results...
DONE (t=2.12s)
creating index...
index created!
Running per image evaluation...
DONE (t=20.02s).
Accumulating evaluation results...
DONE (t=2.10s).
Traceback (most recent call last):
File "test_net.py", line 386, in
imdb_vu.evaluate_detections(all_boxes, output_dir_vu)
File "/home/joseph/project/One-Shot-Object-Detection/lib/datasets/coco.py", line 383, in evaluate_detections
self._do_detection_eval(res_file, output_dir)
File "/home/joseph/project/One-Shot-Object-Detection/lib/datasets/coco.py", line 323, in _do_detection_eval
cocoEval.summarize(class_index=tmp)
File "/home/joseph/project/One-Shot-Object-Detection/lib/datasets/coco.py", line 520, in summarize
self.stats = summarize()
File "/home/joseph/project/One-Shot-Object-Detection/lib/datasets/coco.py", line 486, in _summarizeDets
stats[0] = _summarize(1)
File "/home/joseph/project/One-Shot-Object-Detection/lib/datasets/coco.py", line 454, in _summarize
aind = [i for i, aRng in enumerate(p.areaRngLbl) if aRng == areaRng]
AttributeError: Params instance has no attribute 'areaRngLbl'
can you have any suggestion about this? Very appreciate for your reply!!
Hi
Thank you for your work on this repository. I am trying to test your model on custom images (not COCO), but it seems like the test_net.py required ground truth bounding boxes and image info.
There seems no. way to test the performance on custom images taking query and test image as input - could you please provide a script like that or help me modify your script for doings so ?
Thank you :)
I am currently working on One shot object detection. I need the baseline results to compare with my model. In your paper, you compared your model with Compnet, SiamRPN and SiamFC. Can you please share your implementation of the baselines ? That would be very helpful.
Thanks
A
thanks for your great works! and I have a question, during testing, Can I detect multiple classes simultaneously? or the query must one classes? for examples, if my target images have multiple classes to detect, I have to switch different queries to detect the target classes?
should I compile it with python2.7 and then train/test with python3.6 ?
what about the version of torch when compile the code?
Hi, I've just installed your code in a fresh conda env and got the following errors:
from scipy.misc import imread
. Needed to downgrade to 1.1.0lib/setup.py
, had to compile it manually separatelyFixing those might make future installs easier.
@timy90022
I had tried your model in coco valid 2014 set.
and the results are not good.
for example this image:
This work is so great! Can you share your Pretrained Model--ResNet50? I have requested for access, but no answer. Thanks a lot!
the __C.TRAIN.MARGIN=-0.3 ,why MARGIN <0,thanks.
How to see the operation effect on a specific picture?Is visualization possible?
So sorry! Can you share your PASCAL_VOC datasets.
Hi, I've seen that for the squeeze co-excitation (SCE) part of the paper, a global average pooling operation is performed on the weighted non-local feature map. After I looked at the code implementation for SCE in faster_rcnn.py, I was a little confused because the global average pooling is not implemented in the forward pass in faster_rcnn.py, even though it's initialized in the match_block class, and I couldn't find any other implementations of it in the code base. I commented the GAP initialization and re-ran the test script on the COCO second group and found that it worked with similar accuracy.
Have I misinterpreted the implementation of GAP in SCE or am I looking in the wrong place?
Thanks!
Hi,
Can you please provide set of instruction for training on a custom dataset?
Thanks.
could you please send the demo code so that i can run it to test the trained model with visualization? thank U
Thank you for your work on this repository.
I want to know whether the resnet50 pretrained model in google drive is trained on Imagenet 725 classes?
and how the pretrained model is training, is it trained on One-shot-object-Detection framework??
@timy90022 thanks for the code repo. I have a question regarding the validation set used during training. In the code, it looks like test set is used for validation. Could you please make it clear what exactly is the strategy here. Thanks.
Hey, I want to ask if anyone has encountered this problem
gcc: error: ../MatlabAPI/private/maskApi.c: 没有那个文件或目录
error: command 'gcc' failed with exit status 1
how to solve it? Thank you.
Expect the last work,the code training on PASCAL_VOC datasets.
Hello @timy90022
Thank you for your great work
When trying your code, i had the following error:
$ python test_net.py --s 1 --g 1 --a 4 --cuda
Traceback (most recent call last):
File "test_net.py", line 26, in <module>
from model.roi_layers import nms
File "/home/gachiemchiep/workspace/github/One-Shot-Object-Detection/lib/model/roi_layers/__init__.py", line 3, in <module>
from .nms import nms
File "/home/gachiemchiep/workspace/github/One-Shot-Object-Detection/lib/model/roi_layers/nms.py", line 3, in <module>
from model import _C
ImportError: libtorch.so: cannot open shared object file: No such file or directory
Do you have any idea about this error ?
Apparently the pre-trained weights have been removed, is there any way to get access to them?
https://drive.google.com/file/d/1SL9DDezW-neieqxWyNlheNefwgLanEoV/view?usp=sharing
Traceback (most recent call last):
File "trainval_net.py", line 305, in
data = next(data_iter)
File "/data/zww/anaconda3/envs/zwwpac/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 568, in next
return self._process_next_batch(batch)
File "/data/zww/anaconda3/envs/zwwpac/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 608, in _process_next_batch
raise batch.exc_type(batch.exc_msg)
IndexError: Traceback (most recent call last):
File "/data/zww/anaconda3/envs/zwwpac/lib/python3.6/site-packages/torch/utils/data/_utils/worker.py", line 99, in _worker_loop
samples = collate_fn([dataset[i] for i in batch_indices])
File "/data/zww/anaconda3/envs/zwwpac/lib/python3.6/site-packages/torch/utils/data/_utils/worker.py", line 99, in
samples = collate_fn([dataset[i] for i in batch_indices])
File "/data/zww/test/One-Shot-Object-Detection-master/lib/roi_data_layer/roibatchLoader.py", line 106, in getitem
catgory = blobs['gt_boxes'][:,-1]
IndexError: too many indices for array
Hi,
Can anyone point me specifically about where can I find the non-local block which the authors have mentioned as the first step in their paper (Section 3) ? I am having a hard time finding the same in the code. Thanks.
Best,
Prathmesh.
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.