-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
change aspect ration #10
Open
GainiK
wants to merge
1
commit into
master
Choose a base branch
from
aspect_ratio_change
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,157 @@ | ||
# train.py Config - Training | ||
train: | ||
# For datasets, please pass atleast 1 value. If no datasets exist, pass "" as path for images. | ||
# Synthetic datasets with ground truth labels | ||
datasetsTrain: | ||
- images: '/cleargrasp_hdd/datasets/cleargrasp1/cleargrasp-dataset-train/stemless-plastic-champagne-glass-train/rgb-imgs' | ||
labels: '/cleargrasp_hdd/datasets/cleargrasp1/cleargrasp-dataset-train/stemless-plastic-champagne-glass-train/camera-normals' | ||
- images: '/cleargrasp_hdd/datasets/cleargrasp1/cleargrasp-dataset-train/square-plastic-bottle-train/rgb-imgs' | ||
labels: '/cleargrasp_hdd/datasets/cleargrasp1/cleargrasp-dataset-train/square-plastic-bottle-train/camera-normals' | ||
- images: '/cleargrasp_hdd/datasets/cleargrasp1/cleargrasp-dataset-train/heart-bath-bomb-train/rgb-imgs' | ||
labels: '/cleargrasp_hdd/datasets/cleargrasp1/cleargrasp-dataset-train/heart-bath-bomb-train/camera-normals' | ||
- images: '/cleargrasp_hdd/datasets/cleargrasp1/cleargrasp-dataset-train/flower-bath-bomb-train/rgb-imgs' | ||
labels: '/cleargrasp_hdd/datasets/cleargrasp1/cleargrasp-dataset-train/flower-bath-bomb-train/camera-normals' | ||
- images: '/cleargrasp_hdd/datasets/cleargrasp1/cleargrasp-dataset-train/cup-with-waves-train/rgb-imgs' | ||
labels: '/cleargrasp_hdd/datasets/cleargrasp1/cleargrasp-dataset-train/cup-with-waves-train/camera-normals' | ||
|
||
|
||
# Synthetic datasets with ground truth labels - 10% split of train | ||
datasetsVal: | ||
- images: '/cleargrasp_hdd/datasets/cleargrasp1/cleargrasp-dataset-test-val/synthetic-val/stemless-plastic-champagne-glass-val/rgb-imgs' | ||
labels: '/cleargrasp_hdd/datasets/cleargrasp1/cleargrasp-dataset-test-val/synthetic-val/stemless-plastic-champagne-glass-val/camera-normals' | ||
- images: '/cleargrasp_hdd/datasets/cleargrasp1/cleargrasp-dataset-test-val/synthetic-val/square-plastic-bottle-val/rgb-imgs' | ||
labels: '/cleargrasp_hdd/datasets/cleargrasp1/cleargrasp-dataset-test-val/synthetic-val/square-plastic-bottle-val/camera-normals' | ||
- images: '/cleargrasp_hdd/datasets/cleargrasp1/cleargrasp-dataset-test-val/synthetic-val/heart-bath-bomb-val/rgb-imgs' | ||
labels: '/cleargrasp_hdd/datasets/cleargrasp1/cleargrasp-dataset-test-val/synthetic-val/heart-bath-bomb-val/camera-normals' | ||
- images: '/cleargrasp_hdd/datasets/cleargrasp1/cleargrasp-dataset-test-val/synthetic-val/flower-bath-bomb-val/rgb-imgs' | ||
labels: '/cleargrasp_hdd/datasets/cleargrasp1/cleargrasp-dataset-test-val/synthetic-val/flower-bath-bomb-val/camera-normals' | ||
- images: '/cleargrasp_hdd/datasets/cleargrasp1/cleargrasp-dataset-test-val/synthetic-val/cup-with-waves-val/rgb-imgs' | ||
labels: '/cleargrasp_hdd/datasets/cleargrasp1/cleargrasp-dataset-test-val/synthetic-val/cup-with-waves-val/camera-normals' | ||
|
||
# Real Images (no ground truth labels) | ||
datasetsTestReal: | ||
- images: '/cleargrasp_hdd/datasets/cleargrasp1/cleargrasp-dataset-test-val/real-test/d415/' | ||
labels: '' | ||
- images: '/cleargrasp_hdd/datasets/cleargrasp1/cleargrasp-dataset-test-val/real-test/d435/' | ||
labels: '' | ||
- images: '/cleargrasp_hdd/datasets/cleargrasp1/cleargrasp-dataset-test-val/real-val/d435/' | ||
labels: '' | ||
|
||
# Synthetic datasets with ground truth labels - Used as test set | ||
datasetsTestSynthetic: | ||
- images: '/cleargrasp_hdd/datasets/cleargrasp1/cleargrasp-dataset-test-val/synthetic-test/glass-round-potion-test/rgb-imgs' | ||
labels: '/cleargrasp_hdd/datasets/cleargrasp1/cleargrasp-dataset-test-val/synthetic-test/glass-round-potion-test/camera-normals' | ||
- images: '/cleargrasp_hdd/datasets/cleargrasp1/cleargrasp-dataset-test-val/synthetic-test/glass-square-potion-test/rgb-imgs' | ||
labels: '/cleargrasp_hdd/datasets/cleargrasp1/cleargrasp-dataset-test-val/synthetic-test/glass-square-potion-test/camera-normals' | ||
- images: '/cleargrasp_hdd/datasets/cleargrasp1/cleargrasp-dataset-test-val/synthetic-test/star-bath-bomb-test/rgb-imgs' | ||
labels: '/cleargrasp_hdd/datasets/cleargrasp1/cleargrasp-dataset-test-val/synthetic-test/star-bath-bomb-test/camera-normals' | ||
- images: '/cleargrasp_hdd/datasets/cleargrasp1/cleargrasp-dataset-test-val/synthetic-test/tree-bath-bomb-test/rgb-imgs' | ||
labels: '/cleargrasp_hdd/datasets/cleargrasp1/cleargrasp-dataset-test-val/synthetic-test/tree-bath-bomb-test/camera-normals' | ||
|
||
# For pretraining surface normals on Matterport3D and Scannet Datasets | ||
datasetsMatterportTrain: | ||
# - images: 'data/datasets/matterport3d/train/matterport_rgb/v1/scans' | ||
# labels: 'data/datasets/matterport3d/train/matterport_render_normal' | ||
datasetsMatterportVal: | ||
# - images: 'data/datasets/matterport3d/val/matterport_rgb/v1/scans' | ||
# labels: 'data/datasets/matterport3d/val/matterport_render_normal' | ||
datasetsScannetTrain: | ||
# - images: 'data/datasets/scannet/scannet-rgb/scans/train' | ||
# labels: 'data/datasets/scannet/scannet_render_normal/train' | ||
datasetsScannetVal: | ||
# - images: 'data/datasets/scannet/scannet-rgb/scans/val' | ||
# labels: 'data/datasets/scannet/scannet_render_normal/val' | ||
|
||
|
||
# Training/Validation Params | ||
model: "drn" # Possible values: ['deeplab_xception', 'deeplab_resnet', 'drn'] | ||
batchSize: 8 | ||
batchSizeMatterport: 0 | ||
batchSizeScannet: 0 | ||
validationBatchSize: 8 | ||
testBatchSize: 8 | ||
numEpochs: 500 | ||
imgHeight: 192 | ||
imgWidth: 256 | ||
numClasses: 3 | ||
numInputChannels: 3 # Num of channels in input image. RGB = 3 channels, Grayscale = 1 channel. | ||
numWorkers: 8 # Num of workers used in the dataloader | ||
logsDir: "logs-deeplab" # Directory where logs of each exp will be saved. | ||
lossFunc: "cosine" # Possible values: ['cosine', 'radians'] | ||
percentageDataForTraining: 1.0 # The percentage of images in dataset to be used for training. | ||
percentageDataForMatterportTraining: 0.5 # The percentage of images in dataset to be used for training. | ||
percentageDataForScannetTraining: 0.35 | ||
percentageDataForValidation: 1.0 | ||
percentageDataForMatterportVal: 0.5 | ||
percentageDataForScannettVal: 0.5 | ||
|
||
# Deeplab specific | ||
outputStride: 8 # Possible values: [8, 16]. Output stride for deeplabv3 model. Smaller values give finer details in output mask. | ||
epochSize: 1 # After these many epochs, change learning rate | ||
|
||
continueTraining: False # If true, continue training from a checkpoint | ||
pathPrevCheckpoint: "checkpoints/outlines/drn-256p-contact-edges/checkpoints/checkpoint-epoch-0051.pth" # Path to .pth checkpoint file to load to continue training from | ||
initOptimizerFromCheckpoint: False # Re-Initialize optimizer's state from checkpoint. NOTE: when this is enabled, value of learningRate will be overridden with value from checkpoint. | ||
loadEpochNumberFromCheckpoint: False # If true, the epoch/iter numbering will start from the checkpoint's last epoch num. | ||
|
||
saveImageInterval: 1 # Log output images to tensorboard every saveImageInterval epochs | ||
saveImageIntervalIter: 100 # Every N iterations, log output images to tensorboard | ||
testInterval: 1 # Run on test set every nTestInterval epochs. Keep at 0 to skip tests. | ||
saveModelInterval: 5 # Save the model checkpoints every N epochs | ||
|
||
# Optimizer Params | ||
optimAdam: | ||
learningRate: 0.0001 | ||
weightDecay: 0 # Other values: 0.0001 | ||
optimSgd: | ||
learningRate: 1e-6 | ||
momentum: 0.9 | ||
weight_decay: 5e-4 | ||
lrScheduler: "StepLR" # Possible Values: ['', 'StepLR', 'ReduceLROnPlateau'] | ||
lrSchedulerStep: | ||
step_size: 7 | ||
gamma: 0.1 | ||
lrSchedulerPlateau: | ||
factor: 0.8 | ||
patience: 25 | ||
verbose: True | ||
|
||
# eval.py Config - Validation/Testing Inference | ||
eval: | ||
# Synthetic datasets with ground truth labels | ||
# Used as validation set | ||
datasetsSynthetic: | ||
# - images: 'data/data/datasets/val/cup-with-waves-val/source-files/rgb-imgs' | ||
# labels: 'data/data/datasets/val/cup-with-waves-val/source-files/outlines' | ||
|
||
# Datasets of real images, no labels available | ||
# Used as Test set | ||
datasetsReal: | ||
# - images: "datasets-transparent/studio_pics_sorted/selected_test/d415" | ||
# labels: "datasets-transparent/studio_pics_sorted/selected_test/d415" | ||
# - images: "datasets-transparent/studio_pics_sorted/selected_test/d435" | ||
# labels: "datasets-transparent/studio_pics_sorted/selected_test/d435" | ||
# - images: "datasets-transparent/studio_pics_sorted/selected_val/d435" | ||
# labels: "datasets-transparent/studio_pics_sorted/selected_val/d435" | ||
|
||
datasetsMatterport: | ||
# - images: 'data/datasets/matterport3d/train/matterport_rgb/v1/scans' | ||
# labels: 'data/datasets/matterport3d/train/matterport_render_normal' | ||
|
||
# Params | ||
model: "drn" # Possible values: ['deeplab_xception', 'deeplab_resnet', 'drn'] | ||
numClasses: 3 | ||
batchSize: 32 | ||
imgHeight: 192 | ||
imgWidth: 256 | ||
os: 8 | ||
numWorkers: 4 # Num of workers used in the dataloader | ||
pathWeightsFile: "checkpoints/outlines/drn-256p-contact-edges/checkpoints/checkpoint-epoch-0051.pth" # Path to the checkpoint to be loaded | ||
resultsDir: "data/results" | ||
|
||
|
||
|
||
|
||
#add img resizing | ||
#chnange imgHeight in config train and eval | ||
# chnage paths to folders |
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do remember to increase the batch size to whatever fills the GPU mem on the cloud (ideally some factor of 32)