lojzezust / wasr Goto Github PK
View Code? Open in Web Editor NEWA PyTorch reimplementation of the WaSR obstacle segmentation model
License: Apache License 2.0
A PyTorch reimplementation of the WaSR obstacle segmentation model
License: Apache License 2.0
Would you please let me know why the following error occur?
Best Regards
AttributeError: 'Trainer' object has no attribute 'log_dir'
(WASR) wkyoun@wkyoun-Bonobo-WS:~/다운로드/WaSR-masters$ python train.py --train_config configs/mastr1325_train.yaml --val_config configs/mastr1325_val.yaml --model_name my_wasr --validation --batch_size 2 --epochs 1
Namespace(batch_size=2, epochs=1, focal_loss_scale='labels', gpus=-1, learning_rate=1e-06, log_steps=20, lr_decay_pow=0.9, model='wasr_resnet101_imu', model_name='my_wasr', momentum=0.9, monitor_metric='val/iou/obstacle', monitor_metric_mode='max', no_augmentation=False, no_separation_loss=False, num_classes=3, output_dir='output', patience=None, precision=32, pretrained=True, pretrained_weights=None, random_seed=None, resume_from=None, separation_loss_lambda=0.01, train_config='configs/mastr1325_train.yaml', val_config='configs/mastr1325_val.yaml', validation=True, weight_decay=1e-06, workers=1)
No correct seed found, seed set to 3989317893
Traceback (most recent call last):
File "train.py", line 159, in <module>
main()
File "train.py", line 155, in main
train_wasr(args)
File "train.py", line 143, in train_wasr
precision=args.precision, log_dir="./log_dir")
File "/home/wkyoun/anaconda3/envs/WASR/lib/python3.6/site-packages/pytorch_lightning/trainer/connectors/env_vars_connector.py", line 41, in overwrite_by_env_vars
return fn(self, **kwargs)
TypeError: __init__() got an unexpected keyword argument 'log_dir'
(WASR) wkyoun@wkyoun-Bonobo-WS:~/다운로드/WaSR-masters$ python train.py --train_config configs/mastr1325_train.yaml --val_config configs/mastr1325_val.yaml --model_name my_wasr --validation --batch_size 2 --epochs 1
Namespace(batch_size=2, epochs=1, focal_loss_scale='labels', gpus=-1, learning_rate=1e-06, log_steps=20, lr_decay_pow=0.9, model='wasr_resnet101_imu', model_name='my_wasr', momentum=0.9, monitor_metric='val/iou/obstacle', monitor_metric_mode='max', no_augmentation=False, no_separation_loss=False, num_classes=3, output_dir='output', patience=None, precision=32, pretrained=True, pretrained_weights=None, random_seed=None, resume_from=None, separation_loss_lambda=0.01, train_config='configs/mastr1325_train.yaml', val_config='configs/mastr1325_val.yaml', validation=True, weight_decay=1e-06, workers=1)
No correct seed found, seed set to 2179451097
GPU available: True, used: True
TPU available: False, using: 0 TPU cores
LOCAL_RANK: 0 - CUDA_VISIBLE_DEVICES: [0,1,2,3]
initializing ddp: GLOBAL_RANK: 0, MEMBER: 1/1
| Name | Type | Params
-----------------------------------------------
0 | model | WaSR | 84 M
1 | val_accuracy | PixelAccuracy | 0
2 | val_iou_0 | ClassIoU | 0
3 | val_iou_1 | ClassIoU | 0
4 | val_iou_2 | ClassIoU | 0
INFO:lightning:
| Name | Type | Params
-----------------------------------------------
0 | model | WaSR | 84 M
1 | val_accuracy | PixelAccuracy | 0
2 | val_iou_0 | ClassIoU | 0
3 | val_iou_1 | ClassIoU | 0
4 | val_iou_2 | ClassIoU | 0
/home/wkyoun/anaconda3/envs/WASR/lib/python3.6/site-packages/pytorch_lightning/utilities/distributed.py:45: UserWarning: The dataloader, val dataloader 0, does not have many workers which may be a bottleneck. Consider increasing the value of the `num_workers` argument` (try 12 which is the number of cpus on this machine) in the `DataLoader` init to improve performance.
warnings.warn(*args, **kwargs)
Validation sanity check: 0it [00:00, ?it/s]/home/wkyoun/anaconda3/envs/WASR/lib/python3.6/site-packages/torchvision/transforms/functional.py:365: UserWarning: Argument interpolation should be of type InterpolationMode instead of int. Please, use InterpolationMode enum.
"Argument interpolation should be of type InterpolationMode instead of int. "
/home/wkyoun/anaconda3/envs/WASR/lib/python3.6/site-packages/pytorch_lightning/utilities/distributed.py:45: UserWarning: The dataloader, train dataloader, does not have many workers which may be a bottleneck. Consider increasing the value of the `num_workers` argument` (try 12 which is the number of cpus on this machine) in the `DataLoader` init to improve performance.
warnings.warn(*args, **kwargs)
Epoch 0: 0%| | 0/37 [00:00<?, ?it/s][W reducer.cpp:1050] Warning: find_unused_parameters=True was specified in DDP constructor, but did not find any unused parameters. This flag results in an extra traversal of the autograd graph every iteration, which can adversely affect performance. If your model indeed never has any unused parameters, consider turning this flag off. Note that this warning may be a false positive your model has flow control causing later iterations to have unused parameters. (function operator())
Epoch 0: 100%|████████████| 37/37 [00:46<00:00, 1.27s/it, loss=0.166, v_num=55Saving latest checkpoint...
INFO:lightning:Saving latest checkpoint...
Epoch 0: 100%|████████████| 37/37 [00:46<00:00, 1.27s/it, loss=0.166, v_num=55]
Traceback (most recent call last):
File "train.py", line 159, in <module>
main()
File "train.py", line 155, in main
train_wasr(args)
File "train.py", line 148, in train_wasr
trainer.fit(model, train_dl, val_dl) #, log_dir)
File "/home/wkyoun/anaconda3/envs/WASR/lib/python3.6/site-packages/pytorch_lightning/trainer/trainer.py", line 451, in fit
self.call_hook('on_fit_end')
File "/home/wkyoun/anaconda3/envs/WASR/lib/python3.6/site-packages/pytorch_lightning/trainer/trainer.py", line 833, in call_hook
trainer_hook(*args, **kwargs)
File "/home/wkyoun/anaconda3/envs/WASR/lib/python3.6/site-packages/pytorch_lightning/trainer/callback_hook.py", line 57, in on_fit_end
callback.on_fit_end(self, self.get_model())
File "/home/wkyoun/다운로드/WaSR-masters/wasr/utils.py", line 23, in on_fit_end
export_path = os.path.join(trainer.log_dir, 'weights.pth')
AttributeError: 'Trainer' object has no attribute 'log_dir'
Hello,
I wanted to run predict.py with IMU model, so i followed tutorial in README.
python predict.py
--dataset_config configs/examples.yaml
--model wasr_resnet101_imu
--weights path/to/model/weights.pth
--output_dir output/predictions
But I met the error below.
Traceback (most recent call last):
File "/snap/pycharm-community/293/plugins/python-ce/helpers/pydev/_pydevd_bundle/pydevd_exec2.py", line 3, in Exec
exec(exp, global_vars, local_vars)
File "", line 1, in
File "/.local/lib/python3.8/site-packages/torch/nn/modules/module.py", line 889, in _call_impl/WaSR/wasr/models.py", line 63, in forward
result = self.forward(*input, **kwargs)
File "
features['imu_mask'] = x['imu_mask']
KeyError: 'imu_mask'
How can i fix it?
Good afternoon, could you tell, please, when you'll release code for the new Wasr-T neural net? https://arxiv.org/pdf/2203.05352.pdf
did you evaluate your models on the modd2 dataset?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.