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
OpenPCDet
Commits
972dabe5
Unverified
Commit
972dabe5
authored
Jun 22, 2022
by
yukang
Committed by
GitHub
Jun 22, 2022
Browse files
Update sem_deeplabv3.py
parent
da1f5b12
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
15 deletions
+3
-15
pcdet/models/backbones_3d/focal_sparse_conv/SemanticSeg/sem_deeplabv3.py
...ckbones_3d/focal_sparse_conv/SemanticSeg/sem_deeplabv3.py
+3
-15
No files found.
pcdet/models/backbones_3d/focal_sparse_conv/SemanticSeg/sem_deeplabv3.py
View file @
972dabe5
...
...
@@ -111,7 +111,9 @@ class SegTemplate(nn.Module):
"""
# Preprocess images
x
=
self
.
preprocess
(
images
)
if
self
.
pretrained
:
images
=
normalize
(
images
,
mean
=
self
.
norm_mean
,
std
=
self
.
norm_std
)
x
=
images
.
cuda
()
# Extract features
result
=
OrderedDict
()
...
...
@@ -140,20 +142,6 @@ class SegTemplate(nn.Module):
return
result
def
preprocess
(
self
,
images
):
"""
Preprocess images
Args:
images: (N, 3, H, W), Input images
Return
x: (N, 3, H, W), Preprocessed images
"""
x
=
images
if
self
.
pretrained
:
# Match ResNet pretrained preprocessing
x
=
normalize
(
x
,
mean
=
self
.
norm_mean
,
std
=
self
.
norm_std
)
return
x
.
cuda
()
class
SemDeepLabV3
(
SegTemplate
):
...
...
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