-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from torch-points3d/model-dataset
working training
- Loading branch information
Showing
32 changed files
with
449 additions
and
300 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
# @package dataset | ||
defaults: | ||
- /dataset/default | ||
- /dataset/default | ||
|
||
cfg: | ||
num_classes: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
# @package model | ||
defaults: | ||
- /optimizer: sgd | ||
- /scheduler: | ||
# By default we turn off recursive instantiation, allowing the user to instantiate themselves at the appropriate times. | ||
_recursive_: false | ||
|
||
_target_: torch_points3d.models.base_model.PointCloudBaseModel | ||
optimizer: ${optimizer} | ||
scheduler: ${scheduler} | ||
_target_: torch_points3d.tasks.base_model.PointCloudBaseModule |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# @package model | ||
defaults: | ||
- /model/default | ||
|
||
model: | ||
_recursive_: false | ||
_target_: torch_points3d.models.segmentation.base_model.SegmentationBaseModel | ||
num_classes: ${dataset.cfg.num_classes} | ||
criterion: | ||
_target_: torch.nn.NLLLoss | ||
|
||
backbone: | ||
input_nc: ${dataset.cfg.feature_dimension} | ||
architecture: unet |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# @package model | ||
defaults: | ||
- /model/segmentation/ResUNet32 | ||
|
||
model: | ||
backbone: | ||
down_conv: | ||
N: [ 0, 2, 3, 4, 6 ] | ||
up_conv: | ||
N: [ 1, 1, 1, 1, 1 ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# @package model | ||
defaults: | ||
- /model/segmentation/default | ||
|
||
model: | ||
backbone: | ||
_target_: torch_points3d.applications.sparseconv3d.SparseConv3d | ||
backend: torchsparse | ||
|
||
config: | ||
define_constants: | ||
in_feat: 32 | ||
block: ResBlock # Can be any of the blocks in modules/MinkowskiEngine/api_modules.py | ||
down_conv: | ||
module_name: ResNetDown | ||
block: block | ||
N: [ 0, 1, 2, 2, 3 ] | ||
down_conv_nn: | ||
[ | ||
[ FEAT, in_feat ], | ||
[ in_feat, in_feat ], | ||
[ in_feat, 2*in_feat ], | ||
[ 2*in_feat, 4*in_feat ], | ||
[ 4*in_feat, 8*in_feat ], | ||
] | ||
kernel_size: 3 | ||
stride: [ 1, 2, 2, 2, 2 ] | ||
up_conv: | ||
block: block | ||
module_name: ResNetUp | ||
N: [ 1, 1, 1, 1, 0 ] | ||
up_conv_nn: | ||
[ | ||
[ 8*in_feat, 4*in_feat ], | ||
[ 4*in_feat + 4*in_feat, 4*in_feat ], | ||
[ 4*in_feat + 2*in_feat, 3*in_feat ], | ||
[ 3*in_feat + in_feat, 3*in_feat ], | ||
[ 3*in_feat + in_feat, 3*in_feat ], | ||
] | ||
kernel_size: 3 | ||
stride: [ 2, 2, 2, 2, 1 ] |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
10 changes: 10 additions & 0 deletions
10
torch_points3d/applications/base_architectures/base_model.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import torch.nn as nn | ||
|
||
# This is the base class of the Backbone/API models, that provides useful functions to use within these models | ||
class BaseModel(nn.Module): | ||
|
||
# When creating new tensors (esp sparsetensors), we need to be able to send them to the correct device | ||
# as ptl won't do it automatically | ||
@property | ||
def device(self): | ||
return next(self.parameters()).device |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.