Skip to content

Commit

Permalink
Merge a91a90f into 0f9dfa9
Browse files Browse the repository at this point in the history
  • Loading branch information
sunjiahao1999 authored Jul 5, 2023
2 parents 0f9dfa9 + a91a90f commit 7a06d3a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion requirements/runtime.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ networkx>=2.5
numba # you should install numba==0.53.0 if your environment is cuda-9.0
numpy
nuscenes-devkit
open3d==0.16.0
open3d
plyfile
scikit-image
# by default we also use tensorboard to log results
Expand Down
14 changes: 10 additions & 4 deletions tests/test_apis/test_inferencers/test_lidar_seg3d_inferencer.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
# Copyright (c) OpenMMLab. All rights reserved.
import os
import os.path as osp
import tempfile
from unittest import TestCase

import mmengine
import numpy as np
import pytest
import torch
from mmengine.utils import is_list_of

Expand Down Expand Up @@ -33,9 +35,11 @@ def assert_predictions_equal(self, preds1, preds2):
np.allclose(pred1['pts_semantic_mask'],
pred2['pts_semantic_mask']))

@pytest.mark.skipif(
not torch.cuda.is_available(), reason='requires CUDA support')
@pytest.mark.skipif(
'DISPLAY' not in os.environ, reason='requires DISPLAY device')
def test_call(self):
if not torch.cuda.is_available():
return
# single point cloud
inputs = dict(points='tests/data/s3dis/points/Area_1_office_2.bin')
torch.manual_seed(0)
Expand Down Expand Up @@ -79,9 +83,11 @@ def test_call(self):
self.assertIn('visualization', res_bs2)
self.assertIn('predictions', res_bs2)

@pytest.mark.skipif(
not torch.cuda.is_available(), reason='requires CUDA support')
@pytest.mark.skipif(
'DISPLAY' not in os.environ, reason='requires DISPLAY device')
def test_visualizer(self):
if not torch.cuda.is_available():
return
inputs = dict(points='tests/data/s3dis/points/Area_1_office_2.bin')
# img_out_dir
with tempfile.TemporaryDirectory() as tmp_dir:
Expand Down

0 comments on commit 7a06d3a

Please sign in to comment.