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
84855b37
"models/vscode:/vscode.git/clone" did not exist on "d04051e3e2af0865967a9cc2c28b48f94af9945e"
Unverified
Commit
84855b37
authored
Nov 10, 2021
by
Tai-Wang
Committed by
GitHub
Nov 10, 2021
Browse files
Fix the memory-leak problem in init_detector (#1045)
parent
5ff7c6ac
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
mmdet3d/apis/inference.py
mmdet3d/apis/inference.py
+1
-1
No files found.
mmdet3d/apis/inference.py
View file @
84855b37
...
@@ -57,7 +57,7 @@ def init_model(config, checkpoint=None, device='cuda:0'):
...
@@ -57,7 +57,7 @@ def init_model(config, checkpoint=None, device='cuda:0'):
config
.
model
.
train_cfg
=
None
config
.
model
.
train_cfg
=
None
model
=
build_model
(
config
.
model
,
test_cfg
=
config
.
get
(
'test_cfg'
))
model
=
build_model
(
config
.
model
,
test_cfg
=
config
.
get
(
'test_cfg'
))
if
checkpoint
is
not
None
:
if
checkpoint
is
not
None
:
checkpoint
=
load_checkpoint
(
model
,
checkpoint
)
checkpoint
=
load_checkpoint
(
model
,
checkpoint
,
map_location
=
'cpu'
)
if
'CLASSES'
in
checkpoint
[
'meta'
]:
if
'CLASSES'
in
checkpoint
[
'meta'
]:
model
.
CLASSES
=
checkpoint
[
'meta'
][
'CLASSES'
]
model
.
CLASSES
=
checkpoint
[
'meta'
][
'CLASSES'
]
else
:
else
:
...
...
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