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

Visualization problem #4

Open
VPRzhou opened this issue Oct 22, 2019 · 0 comments
Open

Visualization problem #4

VPRzhou opened this issue Oct 22, 2019 · 0 comments

Comments

@VPRzhou
Copy link

VPRzhou commented Oct 22, 2019

Hi,I have a question to ask you.When I do the viusalization process of running Sparse-to-dense hypercolumn matching. A error occurs.Could you tell me how to solved it?
python run.py --dataset robotcar --mode sparse_to_dense --log_images

Found 1 GPUs to use.
Found 6954 reference images.
Found 3978 query images.
Loading poses from /media/hdd/zhou/datasets/images/all.nvm
import datasets.robotcar_dataset
import image_retrieval.rank_images
import network.network
import pose_prediction.exhaustive_search
import pose_prediction.solve_pnp
import pose_prediction.sparse_to_dense_predictor
import visualization.plot_correspondences

Macros:

==============================================================================

ROBOTCAR_ROOT = '/media/hdd/zhou/datasets'

Parameters for get_dataset_loader:

==============================================================================

get_dataset_loader.dataset_loader_cls = @robotcar_dataset.RobotCarDataset()

Parameters for ImageRetrievalModel:

==============================================================================

ImageRetrievalModel.checkpoint_path = '../checkpoints/robotcar/weights.pth.tar'
ImageRetrievalModel.encoder_dim = 512
ImageRetrievalModel.hypercolumn_layers = [14, 17, 21, 24, 28]
ImageRetrievalModel.num_clusters = 64

Parameters for RobotCarDataset:

==============================================================================

RobotCarDataset.image_folder = 'images/'
RobotCarDataset.name = 'robotcar'
RobotCarDataset.nvm_model = '/media/hdd/zhou/datasets/images/all.nvm'
RobotCarDataset.query_sequences =
['dawn',
'dusk',
'night',
'night-rain',
'overcast-summer',
'overcast-winter',
'rain',
'snow',
'sun']
RobotCarDataset.reference_sequences = ['overcast-reference']
RobotCarDataset.root = %ROBOTCAR_ROOT
RobotCarDataset.triangulation_data_file =
'../data/triangulation/robotcar_triangulation.npz'

Found existing image ranks, loading ../data/ranks/robotcar.npz
Generating pose predictions using sparse-to-dense matching...
0%| | 0/3978 [00:00<?, ?images/s]Traceback (most recent call last):
File "run.py", line 99, in
main(args)
File "run.py", line 95, in main
pose_predictor.save(pose_predictor.run())
File "/home/zhoul/S2DHM/s2dhm/pose_prediction/sparse_to_dense_predictor.py", line 129, in run
export_filename=self._dataset.output_converter(query_image))
File "/home/zhoul/S2DHM/s2dhm/pose_prediction/predictor.py", line 72, in _plot_inliers
export_filename=export_filename)
File "/home/zhoul/anaconda3/envs/s2dhm/lib/python3.7/site-packages/gin/config.py", line 1073, in gin_wrapper
utils.augment_exception_message_and_reraise(e, err_str)
File "/home/zhoul/anaconda3/envs/s2dhm/lib/python3.7/site-packages/gin/utils.py", line 49, in augment_exception_message_and_reraise
six.raise_from(proxy.with_traceback(exception.traceback), None)
File "", line 3, in raise_from
File "/home/zhoul/anaconda3/envs/s2dhm/lib/python3.7/site-packages/gin/config.py", line 1050, in gin_wrapper
return fn(*new_args, **new_kwargs)
File "/home/zhoul/S2DHM/s2dhm/visualization/plot_correspondences.py", line 41, in plot_correspondences
left_image = cv2.cvtColor(cv2.imread('left_image_path'), cv2.COLOR_BGR2RGB)
cv2.error: OpenCV(4.1.1) /io/opencv/modules/imgproc/src/color.cpp:182: error: (-215:Assertion failed) !_src.empty() in function 'cvtColor'

In call to configurable 'plot_correspondences' (<function plot_correspondences at 0x7f82351e46a8>)
0%| | 0/3978 [00:09<?, ?images/s]

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

1 participant