Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
point-transformer
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Maciej Wielgosz
point-transformer
Commits
b2c76861
Commit
b2c76861
authored
2 years ago
by
Maciej Wielgosz
Browse files
Options
Downloads
Patches
Plain Diff
update to run on hpc machine
parent
0b2a41f3
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitignore
+2
-1
2 additions, 1 deletion
.gitignore
config/partseg.yaml
+1
-1
1 addition, 1 deletion
config/partseg.yaml
train_partseg.py
+10
-2
10 additions, 2 deletions
train_partseg.py
with
13 additions
and
4 deletions
.gitignore
+
2
−
1
View file @
b2c76861
...
...
@@ -2,4 +2,5 @@
__pycache__/
modelnet40_normal_resampled/
outputs/
log/
\ No newline at end of file
log/
data/
\ No newline at end of file
This diff is collapsed.
Click to expand it.
config/partseg.yaml
+
1
−
1
View file @
b2c76861
batch_size
:
16
epoch
:
200
learning_rate
:
1e-3
gpu
:
1
gpu
:
0
num_point
:
1024
optimizer
:
Adam
weight_decay
:
1e-4
...
...
This diff is collapsed.
Click to expand it.
train_partseg.py
+
10
−
2
View file @
b2c76861
...
...
@@ -48,9 +48,14 @@ def main(args):
'''
HYPER PARAMETER
'''
os
.
environ
[
"
CUDA_VISIBLE_DEVICES
"
]
=
str
(
args
.
gpu
)
# print('GPU available: {}'.format(torch.cuda.is_available()))
logger
=
logging
.
getLogger
(
__name__
)
print
(
args
.
pretty
())
# print(args.pretty())
# use pretty print to print the config
root
=
hydra
.
utils
.
to_absolute_path
(
'
data/shapenetcore_partanno_segmentation_benchmark_v0_normal/
'
)
...
...
@@ -66,6 +71,9 @@ def main(args):
num_part
=
args
.
num_class
shutil
.
copy
(
hydra
.
utils
.
to_absolute_path
(
'
models/{}/model.py
'
.
format
(
args
.
model
.
name
)),
'
.
'
)
# print if gpu is available
logger
.
info
(
'
GPU available: {}
'
.
format
(
torch
.
cuda
.
is_available
()))
classifier
=
getattr
(
importlib
.
import_module
(
'
models.{}.model
'
.
format
(
args
.
model
.
name
)),
'
PointTransformerSeg
'
)(
args
).
cuda
()
criterion
=
torch
.
nn
.
CrossEntropyLoss
()
...
...
@@ -202,7 +210,7 @@ def main(args):
mean_shape_ious
=
np
.
mean
(
list
(
shape_ious
.
values
()))
test_metrics
[
'
accuracy
'
]
=
total_correct
/
float
(
total_seen
)
test_metrics
[
'
class_avg_accuracy
'
]
=
np
.
mean
(
np
.
array
(
total_correct_class
)
/
np
.
array
(
total_seen_class
,
dtype
=
np
.
float
))
np
.
array
(
total_correct_class
)
/
np
.
array
(
total_seen_class
,
dtype
=
np
.
float
32
))
for
cat
in
sorted
(
shape_ious
.
keys
()):
logger
.
info
(
'
eval mIoU of %s %f
'
%
(
cat
+
'
'
*
(
14
-
len
(
cat
)),
shape_ious
[
cat
]))
test_metrics
[
'
class_avg_iou
'
]
=
mean_shape_ious
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment