Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

any demo script? #10

Open
Kenneth-X opened this issue May 10, 2022 · 6 comments
Open

any demo script? #10

Kenneth-X opened this issue May 10, 2022 · 6 comments

Comments

@Kenneth-X
Copy link

Is there any demo script to inference one single image and visualize?
like https://github.com/open-mmlab/mmdetection/blob/master/demo/image_demo.py

@bryanyzhu
Copy link
Contributor

There is a demo folder contributed in https://github.com/amazon-research/bigdetection/tree/main/demo

@Kenneth-X
Copy link
Author

i followed the install instruction ,which is :

# Install Pytorch
conda install pytorch==1.8.0 torchvision==0.9.0 cudatoolkit=10.2 -c pytorch

# Install mmcv
pip install mmcv-full==1.3.9 -f https://download.openmmlab.com/mmcv/dist/cu102/torch1.8.0/index.html

# Clone and install
git clone https://github.com/amazon-research/bigdetection.git
cd bigdetection
pip install -r requirements/build.txt
pip install -v -e .

but got the error:

Traceback (most recent call last):
  File "demo/image_demo.py", line 51, in <module>
    main(args)
  File "demo/image_demo.py", line 26, in main
    result = inference_detector(model, args.img)
  File "/home/xt.xie/workspace/project/dog_stroller/bigdetection/bigdetection/mmdet/apis/inference.py", line 121, in inference_detector
    test_pipeline = Compose(cfg.data.test.pipeline)
  File "/home/xt.xie/.conda/envs/mm/lib/python3.8/site-packages/mmcv/utils/config.py", line 47, in __getattr__
    raise ex
AttributeError: 'ConfigDict' object has no attribute 'test'

@Kenneth-X Kenneth-X reopened this Aug 1, 2022
@bryanyzhu
Copy link
Contributor

@cailk @JY-Qiao Given the demo script is contributed by you, can you help? Thank you.

@sujeongkim
Copy link

Any updates? I am having the same issue with "configs/BigDetection/cbnetv2/htc_cbv2_swin_base_giou_4conv1f_adamw_bigdet.py"

@sujeongkim
Copy link

sujeongkim commented Oct 4, 2022

Adding "test" to the "data" dictionary in the config file (link) seems working.

Replace lines 130-134 with this:
data = dict( samples_per_gpu=samples_per_gpu, train=dict( pipeline=train_pipeline), test=dict( pipeline=test_pipeline) )

@cailk
Copy link
Contributor

cailk commented Oct 13, 2022

Adding "test" to the "data" dictionary in the config file (link) seems working.

Replace lines 130-134 with this: data = dict( samples_per_gpu=samples_per_gpu, train=dict( pipeline=train_pipeline), test=dict( pipeline=test_pipeline) )

Hi, sorry for the late reply! We have not met such an error in our local environment. It is great that adding a test configuration in "data" would solve this problem. Thank you for your helpful advice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants