ubc-vision / image-matching-benchmark

Public release of the Image Matching Benchmark: https://image-matching-challenge.github.io
https://image-matching-challenge.github.io
Apache License 2.0
527 stars 93 forks source link

error " raise RuntimeError('Subprocess error!') " #21

Closed InstantWindy closed 4 years ago

InstantWindy commented 4 years ago

Hi, Atfer I import features extracted by sosnet, runing run.py, it shows errors" raise RuntimeError('Subprocess error!')".Thanks

kmyi commented 4 years ago

That's very cryptic. Can you post the entire error here?

InstantWindy commented 4 years ago

Traceback (most recent call last): File "/home/pcl/anaconda3/envs/match/lib/python3.6/site-packages/joblib/externals/loky/process_executor.py", line 418, in _process_worker r = call_item() File "/home/pcl/anaconda3/envs/match/lib/python3.6/site-packages/joblib/externals/loky/process_executor.py", line 272, in call return self.fn(*self.args, *self.kwargs) File "/home/pcl/anaconda3/envs/match/lib/python3.6/site-packages/joblib/_parallel_backends.py", line 608, in call return self.func(args, **kwargs) File "/home/pcl/anaconda3/envs/match/lib/python3.6/site-packages/joblib/parallel.py", line 256, in call for func, args, kwargs in self.items] File "/home/pcl/anaconda3/envs/match/lib/python3.6/site-packages/joblib/parallel.py", line 256, in for func, args, kwargs in self.items] File "compute_match.py", line 56, in compute_matches kps2) File "/home/pcl/image-matching-benchmark/methods/feature_matching/nn.py", line 95, in match matches = bf.knnMatch(desc1, desc2, k=max(2, numnn + 1)) cv2.error: OpenCV(3.4.2) /io/opencv/modules/flann/src/miniflann.cpp:315: error: (-210:Unsupported format or combination of formats) in function 'buildIndex'

type=1021

"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "compute_match.py", line 128, in main(cfg) File "compute_match.py", line 97, in main for pair in tqdm(pairs)) File "/home/pcl/anaconda3/envs/match/lib/python3.6/site-packages/joblib/parallel.py", line 1017, in call self.retrieve() File "/home/pcl/anaconda3/envs/match/lib/python3.6/site-packages/joblib/parallel.py", line 909, in retrieve self._output.extend(job.get(timeout=self.timeout)) File "/home/pcl/anaconda3/envs/match/lib/python3.6/site-packages/joblib/_parallel_backends.py", line 562, in wrap_future_result return future.result(timeout=timeout) File "/home/pcl/anaconda3/envs/match/lib/python3.6/concurrent/futures/_base.py", line 432, in result return self.get_result() File "/home/pcl/anaconda3/envs/match/lib/python3.6/concurrent/futures/_base.py", line 384, in get_result raise self.exception cv2.error: OpenCV(3.4.2) /io/opencv/modules/flann/src/miniflann.cpp:315: error: (-210:Unsupported format or combination of formats) in function 'buildIndex'

type=1021


interactive_res: CompletedProcess(args=['bash', './jobs/28e35d3e74643f776f1f66146ac626ed109e431d9c9f62eaa82fc19cf01bb7ae'], returncode=1)

Traceback (most recent call last): File "run.py", line 266, in main(cfg) File "run.py", line 204, in main job_dict) File "run.py", line 48, in create_eval_jobs job = create_and_queue_jobs(cmd_list, cfg, dep_str) File "/home/pcl/image-matching-benchmark/utils/queue_helper.py", line 316, in create_and_queue_jobs cpu=cpu) File "/home/pcl/image-matching-benchmark/utils/queue_helper.py", line 164, in queue_job raise RuntimeError('Subprocess error!') RuntimeError: Subprocess error!

kmyi commented 4 years ago

Seems like the same error as #19?

InstantWindy commented 4 years ago

I only changed the config_common of the JSON file, my changes are as following: "config_common": { "json_label": "sosNet-upright-2k-degensac-inlier-th-0.1", "keypoint": "sosNet-def", "descriptor": "sosNet-upright", "num_keypoints": 2048, }

etrulls commented 4 years ago

Can you try disabling FLANN? (Two lines in the JSON).

InstantWindy commented 4 years ago

It doesn't work.

Traceback (most recent call last):
  File "/home/pcl/anaconda3/envs/match/lib/python3.6/site-packages/joblib/externals/loky/process_executor.py", line 418, in _process_worker
    r = call_item()
  File "/home/pcl/anaconda3/envs/match/lib/python3.6/site-packages/joblib/externals/loky/process_executor.py", line 272, in __call__
    return self.fn(*self.args, **self.kwargs)
  File "/home/pcl/anaconda3/envs/match/lib/python3.6/site-packages/joblib/_parallel_backends.py", line 608, in __call__
    return self.func(*args, **kwargs)
  File "/home/pcl/anaconda3/envs/match/lib/python3.6/site-packages/joblib/parallel.py", line 256, in __call__
    for func, args, kwargs in self.items]
  File "/home/pcl/anaconda3/envs/match/lib/python3.6/site-packages/joblib/parallel.py", line 256, in <listcomp>
    for func, args, kwargs in self.items]
  File "compute_match.py", line 56, in compute_matches
    kps2)
  File "/home/pcl/image-matching-benchmark/methods/feature_matching/nn.py", line 95, in match
    matches = bf.knnMatch(desc1, desc2, k=max(2, num_nn + 1))
cv2.error: OpenCV(3.4.2) /io/opencv/modules/core/src/batch_distance.cpp:238: error: (-215:Assertion failed) type == src2.type() && src1.cols == src2.cols && (type == 5 || type == 0) in function 'batchDistance'

"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "compute_match.py", line 128, in <module>
    main(cfg)
  File "compute_match.py", line 97, in main
    for pair in tqdm(pairs))
  File "/home/pcl/anaconda3/envs/match/lib/python3.6/site-packages/joblib/parallel.py", line 1017, in __call__
    self.retrieve()
  File "/home/pcl/anaconda3/envs/match/lib/python3.6/site-packages/joblib/parallel.py", line 909, in retrieve
    self._output.extend(job.get(timeout=self.timeout))
  File "/home/pcl/anaconda3/envs/match/lib/python3.6/site-packages/joblib/_parallel_backends.py", line 562, in wrap_future_result
    return future.result(timeout=timeout)
  File "/home/pcl/anaconda3/envs/match/lib/python3.6/concurrent/futures/_base.py", line 432, in result
    return self.__get_result()
  File "/home/pcl/anaconda3/envs/match/lib/python3.6/concurrent/futures/_base.py", line 384, in __get_result
    raise self._exception
cv2.error: OpenCV(3.4.2) /io/opencv/modules/core/src/batch_distance.cpp:238: error: (-215:Assertion failed) type == src2.type() && src1.cols == src2.cols && (type == 5 || type == 0) in function 'batchDistance'

------------------------------------------------------
interactive_res: CompletedProcess(args=['bash', './jobs/55492b573ad9cecf0fe814c6499a7f7e3b6e68969ba4594147dc4ecec6d8c8e0'], returncode=1)
------------------------------------------------------------------
Traceback (most recent call last):
  File "run.py", line 266, in <module>
    main(cfg)
  File "run.py", line 204, in main
    job_dict)
  File "run.py", line 48, in create_eval_jobs
    job = create_and_queue_jobs(cmd_list, cfg, dep_str)
  File "/home/pcl/image-matching-benchmark/utils/queue_helper.py", line 316, in create_and_queue_jobs
    cpu=cpu)
  File "/home/pcl/image-matching-benchmark/utils/queue_helper.py", line 164, in queue_job
    raise RuntimeError('Subprocess error!')
RuntimeError: Subprocess error!
kmyi commented 4 years ago

Seems like there's an issue with how the descriptors are being passed? Have you checked that they are correct? OpenCV is telling you that

cv2.error: OpenCV(3.4.2) /io/opencv/modules/core/src/batch_distance.cpp:238: error: (-215:Assertion failed) type == src2.type() && src1.cols == src2.cols && (type == 5 || type == 0) in function 'batchDistance'