Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
mmdetection3d
Commits
86cc487c
Unverified
Commit
86cc487c
authored
Feb 16, 2022
by
ChaimZhu
Committed by
GitHub
Feb 16, 2022
Browse files
fix inference_demo.ipynb bug (#1236)
parent
4a7e5609
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
32 deletions
+32
-32
demo/inference_demo.ipynb
demo/inference_demo.ipynb
+32
-32
No files found.
demo/inference_demo.ipynb
View file @
86cc487c
...
@@ -3,74 +3,74 @@
...
@@ -3,74 +3,74 @@
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count": 7,
"execution_count": 7,
"source": [
"from mmdet3d.apis import init_model, inference_detector, show_result_meshlab"
],
"outputs": [],
"metadata": {
"metadata": {
"pycharm": {
"pycharm": {
"is_executing": false
"is_executing": false
}
}
},
}
"outputs": [],
"source": [
"from mmdet3d.apis import init_detector, inference_detector, show_result_meshlab"
]
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count": 8,
"execution_count": 8,
"metadata": {
"pycharm": {
"is_executing": false
}
},
"outputs": [],
"source": [
"source": [
"config_file = '../configs/second/hv_second_secfpn_6x8_80e_kitti-3d-car.py'\n",
"config_file = '../configs/second/hv_second_secfpn_6x8_80e_kitti-3d-car.py'\n",
"# download the checkpoint from model zoo and put it in `checkpoints/`\n",
"# download the checkpoint from model zoo and put it in `checkpoints/`\n",
"checkpoint_file = '../work_dirs/second/epoch_40.pth'"
"checkpoint_file = '../work_dirs/second/epoch_40.pth'"
]
],
"outputs": [],
"metadata": {
"pycharm": {
"is_executing": false
}
}
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count": 9,
"execution_count": 9,
"source": [
"# build the model from a config file and a checkpoint file\n",
"model = init_model(config_file, checkpoint_file, device='cuda:0')"
],
"outputs": [],
"metadata": {
"metadata": {
"pycharm": {
"pycharm": {
"is_executing": false
"is_executing": false
}
}
},
}
"outputs": [],
"source": [
"# build the model from a config file and a checkpoint file\n",
"model = init_detector(config_file, checkpoint_file, device='cuda:0')"
]
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count": 10,
"execution_count": 10,
"metadata": {
"pycharm": {
"is_executing": false
}
},
"outputs": [],
"source": [
"source": [
"# test a single sample\n",
"# test a single sample\n",
"pcd = 'kitti_000008.bin'\n",
"pcd = 'kitti_000008.bin'\n",
"result, data = inference_detector(model, pcd)"
"result, data = inference_detector(model, pcd)"
]
],
},
"outputs": [],
{
"cell_type": "code",
"execution_count": 11,
"metadata": {
"metadata": {
"pycharm": {
"pycharm": {
"is_executing": false
"is_executing": false
}
}
},
}
"outputs": [],
},
{
"cell_type": "code",
"execution_count": 11,
"source": [
"source": [
"# show the results\n",
"# show the results\n",
"out_dir = './'\n",
"out_dir = './'\n",
"show_result_meshlab(data, result, out_dir)"
"show_result_meshlab(data, result, out_dir)"
]
],
"outputs": [],
"metadata": {
"pycharm": {
"is_executing": false
}
}
}
}
],
],
"metadata": {
"metadata": {
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment