GithubHelp home page GithubHelp logo

Comments (9)

YuwenXiong avatar YuwenXiong commented on May 28, 2024

I think that might because your cpu memory is not large enough. You can modify base_dataset.py L225, change cpu_num to a smaller number, e.g. 1, 2 or 4

from upsnet.

WenFuLee avatar WenFuLee commented on May 28, 2024

I tried cpu_num = 1 and 2, but it didn't help. Wondering how many CPU ram you have.
I google this issue: https://stackoverflow.com/questions/20111242/how-to-avoid-errno-12-cannot-allocate-memory-errors-caused-by-using-subprocess/26416661
I may try to use swap now...

from upsnet.

YuwenXiong avatar YuwenXiong commented on May 28, 2024

Then please try to remove all multi-thread code, use a single core instead, for example change L228 to p = BaseDataset._load_image_single_core(proc_id, files_set, pan_gt_folder) and do corresponding modification for other part.

from upsnet.

WenFuLee avatar WenFuLee commented on May 28, 2024

After adding swap, I got some progress. I haven't tried to remove all multi-thread code and to use a single core. All I changed is to hard-code cpu_num to 1. Do you have any idea? Thanks.

2019-04-17 04:52:53,975 | upsnet_end2end_test.py | line 306: unified pano result:
Traceback (most recent call last):
  File "upsnet/upsnet_end2end_test.py", line 315, in <module>
    upsnet_test()
  File "upsnet/upsnet_end2end_test.py", line 307, in upsnet_test
    test_dataset.evaluate_panoptic(test_dataset.get_unified_pan_result(all_ssegs, all_panos, all_pano_cls_inds, stuff_area_limit=config.test.panoptic_stuff_area_limit), os.path.join(final_output_path, 'results', 'pans_unified'))
  File "upsnet/../upsnet/dataset/base_dataset.py", line 327, in evaluate_panoptic
    pred_pans, pred_json = get_pred(pred_pans_2ch, color_gererator)
  File "upsnet/../upsnet/dataset/base_dataset.py", line 257, in get_pred
    p = p.get()
  File "/home/wen-fulee/anaconda3/lib/python3.6/multiprocessing/pool.py", line 644, in get
    raise self._value
  File "/home/wen-fulee/anaconda3/lib/python3.6/multiprocessing/pool.py", line 424, in _handle_tasks
    put(task)
  File "/home/wen-fulee/anaconda3/lib/python3.6/multiprocessing/connection.py", line 206, in send
    self._send_bytes(_ForkingPickler.dumps(obj))
  File "/home/wen-fulee/anaconda3/lib/python3.6/multiprocessing/connection.py", line 393, in _send_bytes
    header = struct.pack("!i", n)
struct.error: 'i' format requires -2147483648 <= number <= 2147483647

from upsnet.

WenFuLee avatar WenFuLee commented on May 28, 2024

After removing all multi-thread code and using a single core instead, I got errors about p.get(),
which shows p is a list object and doesn't have get() function. How should I modify codes for p.get() as well? Thanks.

from upsnet.

YuwenXiong avatar YuwenXiong commented on May 28, 2024

use p instead

from upsnet.

WenFuLee avatar WenFuLee commented on May 28, 2024

This issue was solved after removing all multi-thread code and using a single core instead.

from upsnet.

phongnhhn92 avatar phongnhhn92 commented on May 28, 2024

@WenFuLee hi ! can you share the base_dataset.py that you have modified to run test on a single GPU ?

from upsnet.

ChengJianjia avatar ChengJianjia commented on May 28, 2024

This issue was solved after removing all multi-thread code and using a single core instead.
can you share how to remove all multi-thread code?

from upsnet.

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.