GithubHelp home page GithubHelp logo

Comments (5)

yrcong avatar yrcong commented on June 8, 2024
  1. My scipy version is 1.1.0. You could switch to this version.
  2. You could use
python setup.py build_ext --inplace

to compile the box_intersections_cpu/draw_rectangles code.

Please let me know if you still meet some problems:)

from sttran.

PrimoWW avatar PrimoWW commented on June 8, 2024

thanks for your advice! when I fixed these problem with your help. Then I countinued to run the code, and the program raise a ERROR

ImportError: cannot import name '_C' from 'fasterRCNN.lib.model' (/home/xxx/project/STTran/fasterRCNN/lib/model/init.py)

so ,I solved the problem by running (maybe you should add this command into README)

/STTran/fasterRCNN/lib$ python setup.py build_ext --inplace

and then , I met this error:

Traceback (most recent call last):
File "train.py", line 41, in
object_detector = detector(train=True, object_classes=AG_dataset_train.object_classes, use_SUPPLY=True, mode=conf.mode).to(device=gpu_device)
File "/home/xxx/project/STTran/lib/object_detector.py", line 29, in init
checkpoint = torch.load('fasterRCNN/models/faster_rcnn_ag.pth.pth')
File "/home/xxx/anaconda3/envs/scene_graph_benchmark/lib/python3.7/site-packages/torch/serialization.py", line 381, in load
f = open(f, 'rb')
FileNotFoundError: [Errno 2] No such file or directory: 'fasterRCNN/models/faster_rcnn_ag.pth.pth'

I found the reason is that In the file lib/object_detector.py , 29th line,
checkpoint = torch.load('fasterRCNN/models/faster_rcnn_ag.pth.pth')
it seems that there are double 'pth'.

when I solved these problem , I can run the program successfully. but unfortunately I found there is not enough GPU memory that I need. So I may continue to ask questions when I have enough GPU memory. :)

from sttran.

yrcong avatar yrcong commented on June 8, 2024

Thanks for reminding! There is a redundant suffix exactly.

For GPU, I used RTX2080ti (ca. 11GB memory).

from sttran.

PrimoWW avatar PrimoWW commented on June 8, 2024

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
loading word vectors from data/glove.6B.200d.pt
loading word vectors from /home/xxx/Dokumente/neural-motifs-master/data/glove.6B.200d.pt
background -> background
fail on background
Traceback (most recent call last):
File "train.py", line 102, in
entry = object_detector(im_data, im_info, gt_boxes, num_boxes, gt_annotation ,im_all=None)
File "/home/xxx/anaconda3/envs/scene_graph_benchmark/lib/python3.7/site-packages/torch/nn/modules/module.py", line 547, in call
result = self.forward(*input, **kwargs)
File "/home/xxx/project/STTran/lib/object_detector.py", line 306, in forward
FINAL_FEATURES = self.fasterRCNN.RCNN_roi_align(FINAL_BASE_FEATURES, FINAL_BBOXES)
File "/home/xxx/anaconda3/envs/scene_graph_benchmark/lib/python3.7/site-packages/torch/nn/modules/module.py", line 547, in call
result = self.forward(*input, kwargs)
File "/home/xxx/project/STTran/fasterRCNN/lib/model/roi_layers/roi_align.py", line 58, in forward
input, rois, self.output_size, self.spatial_scale, self.sampling_ratio
File "/home/xxx/project/STTran/fasterRCNN/lib/model/roi_layers/roi_align.py", line 20, in forward
output = _C.roi_align_forward(input, roi, spatial_scale, output_size[0], output_size[1], sampling_ratio)
RuntimeError: Not compiled with GPU support (ROIAlign_forward at /home/xxx/project/STTran/fasterRCNN/lib/model/csrc/ROIAlign.h:21)
frame #0: c10::Error::Error(c10::SourceLocation, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&) + 0x6d (0x7fc22b3171cd in /home/xxx/anaconda3/envs/scene_graph_benchmark/lib/python3.7/site-packages/torch/lib/libc10.so)
frame #1: + 0xb314 (0x7fc1f4145314 in /home/xxx/project/STTran/fasterRCNN/lib/model/_C.cpython-37m-x86_64-linux-gnu.so)
frame #2: + 0x22164 (0x7fc1f415c164 in /home/xxx/project/STTran/fasterRCNN/lib/model/_C.cpython-37m-x86_64-linux-gnu.so)
frame #3: + 0x1d7f4 (0x7fc1f41577f4 in /home/xxx/project/STTran/fasterRCNN/lib/model/_C.cpython-37m-x86_64-linux-gnu.so)

frame #8: THPFunction_apply(_object
, _object
) + 0xa56 (0x7fc24dbda5f6 in /home/xxx/anaconda3/envs/scene_graph_benchmark/lib/python3.7/site-packages/torch/lib/libtorch_python.so)
frame #41: __libc_start_main + 0xf3 (0x7fc25c8200b3 in /lib/x86_64-linux-gnu/libc.so.6)

there are a problem that i cant solve, i guess that maybe I cant use the C lib.

from sttran.

PrimoWW avatar PrimoWW commented on June 8, 2024

thank you for your help! I ran the code successfully

from sttran.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.