Skip to content
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

How to work on vis_result #82

Closed
jackie174 opened this issue Nov 26, 2022 · 1 comment
Closed

How to work on vis_result #82

jackie174 opened this issue Nov 26, 2022 · 1 comment

Comments

@jackie174
Copy link

Hello, Thanks so much for helping before.
Now I can start the code,
First I train a model.

bash ./scripts/train.sh 0 --config ./cfgs/KITTI_models/PoinTr.yaml --exp_name example

Then I test the model (Because I want to see the image)

bash ./scripts/test.sh 0 --ckpts ./experiments/PoinTr/KITTI_models/example/ckpt-best.pth --config ./cfgs/KITTI_models/PoinTr.yaml --exp_name example
CUDA_VISIBLE_DEVICES=0 
python3 KITTI_metric.py --vis ./experiments/PoinTr/KITTI_models/test_example/vis_result 

Then, the problem is I wait a too long time to get the above command finished.

+ GPUS=0
+ PY_ARGS='--ckpts ./experiments/PoinTr/KITTI_models/example/ckpt-best.pth --config ./cfgs/KITTI_models/PoinTr.yaml --exp_name example'
+ CUDA_VISIBLE_DEVICES=0
+ python main.py --test --ckpts ./experiments/PoinTr/KITTI_models/example/ckpt-best.pth --config ./cfgs/KITTI_models/PoinTr.yaml --exp_name example
Create experiment path successfully at ./experiments/PoinTr/KITTI_models/test_example
Create TFBoard path successfully at ./experiments/PoinTr/KITTI_models/TFBoard/test_example
2022-11-25 23:22:02,197 - PoinTr - INFO - Copy the Config file from ./cfgs/KITTI_models/PoinTr.yaml to ./experiments/PoinTr/KITTI_models/test_example/config.yaml
2022-11-25 23:22:02,198 - PoinTr - INFO - args.config : ./cfgs/KITTI_models/PoinTr.yaml
2022-11-25 23:22:02,198 - PoinTr - INFO - args.launcher : none
2022-11-25 23:22:02,198 - PoinTr - INFO - args.local_rank : 0
2022-11-25 23:22:02,198 - PoinTr - INFO - args.num_workers : 4
2022-11-25 23:22:02,198 - PoinTr - INFO - args.seed : 0
2022-11-25 23:22:02,198 - PoinTr - INFO - args.deterministic : False
2022-11-25 23:22:02,198 - PoinTr - INFO - args.sync_bn : False
2022-11-25 23:22:02,198 - PoinTr - INFO - args.exp_name : test_example
2022-11-25 23:22:02,198 - PoinTr - INFO - args.start_ckpts : None
2022-11-25 23:22:02,198 - PoinTr - INFO - args.ckpts : ./experiments/PoinTr/KITTI_models/example/ckpt-best.pth
2022-11-25 23:22:02,198 - PoinTr - INFO - args.val_freq : 1
2022-11-25 23:22:02,198 - PoinTr - INFO - args.resume : False
2022-11-25 23:22:02,198 - PoinTr - INFO - args.test : True
2022-11-25 23:22:02,198 - PoinTr - INFO - args.mode : None
2022-11-25 23:22:02,198 - PoinTr - INFO - args.experiment_path : ./experiments/PoinTr/KITTI_models/test_example
2022-11-25 23:22:02,198 - PoinTr - INFO - args.tfboard_path : ./experiments/PoinTr/KITTI_models/TFBoard/test_example
2022-11-25 23:22:02,198 - PoinTr - INFO - args.log_name : PoinTr
2022-11-25 23:22:02,198 - PoinTr - INFO - args.use_gpu : True
2022-11-25 23:22:02,198 - PoinTr - INFO - args.distributed : False
2022-11-25 23:22:02,198 - PoinTr - INFO - config.optimizer = edict()
2022-11-25 23:22:02,199 - PoinTr - INFO - config.optimizer.type : AdamW
2022-11-25 23:22:02,199 - PoinTr - INFO - config.optimizer.kwargs = edict()
2022-11-25 23:22:02,199 - PoinTr - INFO - config.optimizer.kwargs.lr : 0.0001
2022-11-25 23:22:02,199 - PoinTr - INFO - config.optimizer.kwargs.weight_decay : 0.0005
2022-11-25 23:22:02,199 - PoinTr - INFO - config.scheduler = edict()
2022-11-25 23:22:02,199 - PoinTr - INFO - config.scheduler.type : LambdaLR
2022-11-25 23:22:02,199 - PoinTr - INFO - config.scheduler.kwargs = edict()
2022-11-25 23:22:02,199 - PoinTr - INFO - config.scheduler.kwargs.decay_step : 21
2022-11-25 23:22:02,199 - PoinTr - INFO - config.scheduler.kwargs.lr_decay : 0.9
2022-11-25 23:22:02,199 - PoinTr - INFO - config.scheduler.kwargs.lowest_decay : 0.02
2022-11-25 23:22:02,199 - PoinTr - INFO - config.bnmscheduler = edict()
2022-11-25 23:22:02,199 - PoinTr - INFO - config.bnmscheduler.type : Lambda
2022-11-25 23:22:02,199 - PoinTr - INFO - config.bnmscheduler.kwargs = edict()
2022-11-25 23:22:02,199 - PoinTr - INFO - config.bnmscheduler.kwargs.decay_step : 21
2022-11-25 23:22:02,199 - PoinTr - INFO - config.bnmscheduler.kwargs.bn_decay : 0.5
2022-11-25 23:22:02,199 - PoinTr - INFO - config.bnmscheduler.kwargs.bn_momentum : 0.9
2022-11-25 23:22:02,199 - PoinTr - INFO - config.bnmscheduler.kwargs.lowest_decay : 0.01
2022-11-25 23:22:02,199 - PoinTr - INFO - config.dataset = edict()
2022-11-25 23:22:02,199 - PoinTr - INFO - config.dataset.train = edict()
2022-11-25 23:22:02,200 - PoinTr - INFO - config.dataset.train._base_ = edict()
2022-11-25 23:22:02,200 - PoinTr - INFO - config.dataset.train._base_.NAME : PCN
2022-11-25 23:22:02,200 - PoinTr - INFO - config.dataset.train._base_.CATEGORY_FILE_PATH : data/PCN/PCN.json
2022-11-25 23:22:02,200 - PoinTr - INFO - config.dataset.train._base_.N_POINTS : 16384
2022-11-25 23:22:02,200 - PoinTr - INFO - config.dataset.train._base_.N_RENDERINGS : 8
2022-11-25 23:22:02,200 - PoinTr - INFO - config.dataset.train._base_.PARTIAL_POINTS_PATH : data/PCN/%s/partial/%s/%s/%02d.pcd
2022-11-25 23:22:02,200 - PoinTr - INFO - config.dataset.train._base_.COMPLETE_POINTS_PATH : data/PCN/%s/complete/%s/%s.pcd
2022-11-25 23:22:02,200 - PoinTr - INFO - config.dataset.train._base_.CARS : True
2022-11-25 23:22:02,200 - PoinTr - INFO - config.dataset.train.others = edict()
2022-11-25 23:22:02,200 - PoinTr - INFO - config.dataset.train.others.subset : train
2022-11-25 23:22:02,200 - PoinTr - INFO - config.dataset.train.others.bs : 50
2022-11-25 23:22:02,200 - PoinTr - INFO - config.dataset.val = edict()
2022-11-25 23:22:02,200 - PoinTr - INFO - config.dataset.val._base_ = edict()
2022-11-25 23:22:02,200 - PoinTr - INFO - config.dataset.val._base_.NAME : PCN
2022-11-25 23:22:02,200 - PoinTr - INFO - config.dataset.val._base_.CATEGORY_FILE_PATH : data/PCN/PCN.json
2022-11-25 23:22:02,200 - PoinTr - INFO - config.dataset.val._base_.N_POINTS : 16384
2022-11-25 23:22:02,200 - PoinTr - INFO - config.dataset.val._base_.N_RENDERINGS : 8
2022-11-25 23:22:02,200 - PoinTr - INFO - config.dataset.val._base_.PARTIAL_POINTS_PATH : data/PCN/%s/partial/%s/%s/%02d.pcd
2022-11-25 23:22:02,200 - PoinTr - INFO - config.dataset.val._base_.COMPLETE_POINTS_PATH : data/PCN/%s/complete/%s/%s.pcd
2022-11-25 23:22:02,200 - PoinTr - INFO - config.dataset.val._base_.CARS : True
2022-11-25 23:22:02,200 - PoinTr - INFO - config.dataset.val.others = edict()
2022-11-25 23:22:02,200 - PoinTr - INFO - config.dataset.val.others.subset : test
2022-11-25 23:22:02,201 - PoinTr - INFO - config.dataset.test = edict()
2022-11-25 23:22:02,201 - PoinTr - INFO - config.dataset.test._base_ = edict()
2022-11-25 23:22:02,201 - PoinTr - INFO - config.dataset.test._base_.NAME : KITTI
2022-11-25 23:22:02,201 - PoinTr - INFO - config.dataset.test._base_.CATEGORY_FILE_PATH : data/KITTI/KITTI.json
2022-11-25 23:22:02,201 - PoinTr - INFO - config.dataset.test._base_.N_POINTS : 16384
2022-11-25 23:22:02,201 - PoinTr - INFO - config.dataset.test._base_.CLOUD_PATH : data/KITTI/cars/%s.pcd
2022-11-25 23:22:02,201 - PoinTr - INFO - config.dataset.test._base_.BBOX_PATH : data/KITTI/bboxes/%s.txt
2022-11-25 23:22:02,201 - PoinTr - INFO - config.dataset.test.others = edict()
2022-11-25 23:22:02,201 - PoinTr - INFO - config.dataset.test.others.subset : test
2022-11-25 23:22:02,201 - PoinTr - INFO - config.model = edict()
2022-11-25 23:22:02,201 - PoinTr - INFO - config.model.NAME : PoinTr
2022-11-25 23:22:02,201 - PoinTr - INFO - config.model.num_pred : 14336
2022-11-25 23:22:02,201 - PoinTr - INFO - config.model.num_query : 224
2022-11-25 23:22:02,201 - PoinTr - INFO - config.model.knn_layer : 1
2022-11-25 23:22:02,201 - PoinTr - INFO - config.model.trans_dim : 192
2022-11-25 23:22:02,201 - PoinTr - INFO - config.total_bs : 50
2022-11-25 23:22:02,201 - PoinTr - INFO - config.step_per_update : 1
2022-11-25 23:22:02,201 - PoinTr - INFO - config.max_epoch : 5
2022-11-25 23:22:02,201 - PoinTr - INFO - config.consider_metric : CDL1
2022-11-25 23:22:02,202 - PoinTr - INFO - Distributed training: False
2022-11-25 23:22:02,202 - PoinTr - INFO - Set random seed to 0, deterministic: FalseNamespace(ckpts='./experiments/PoinTr/KITTI_models/example/ckpt-best.pth', config='./cfgs/KITTI_models/PoinTr.yaml', deterministic=False, distributed=False, exp_name='test_example', experiment_path='./experiments/PoinTr/KITTI_models/test_example', launcher='none', local_rank=0, log_name='PoinTr', mode=None, num_workers=4, resume=False, seed=0, start_ckpts=None, sync_bn=False, test=True, tfboard_path='./experiments/PoinTr/KITTI_models/TFBoard/test_example', use_gpu=True, val_freq=1)
Namespace(ckpts='./experiments/PoinTr/KITTI_models/example/ckpt-best.pth', config='./cfgs/KITTI_models/PoinTr.yaml', deterministic=False, distributed=False, exp_name='test_example', experiment_path='./experiments/PoinTr/KITTI_models/test_example', launcher='none', local_rank=0, log_name='PoinTr', mode=None, num_workers=4, resume=False, seed=0, start_ckpts=None, sync_bn=False, test=True, tfboard_path='./experiments/PoinTr/KITTI_models/TFBoard/test_example', use_gpu=True, val_freq=1)
2022-11-25 23:22:02,202 - PoinTr - INFO - Tester start ... 
2022-11-25 23:22:02,209 - MODEL - INFO -  Transformer with knn_layer 1
2022-11-25 23:22:04,397 - PoinTr - INFO - Loading weights from ./experiments/PoinTr/KITTI_models/example/ckpt-best.pth...
2022-11-25 23:22:04,541 - PoinTr - INFO - ckpts @ 2 epoch( performance = {'F-Score': 0.4451862297689318, 'CDL1': 15.482036614169678, 'CDL2': 0.890264076879248})
/usr/local/envs/myenv/bin/python
2022-11-25 23:33:17,914 - PCNDATASET - INFO - Collecting files of Taxonomy [ID=02958343, Name=car]
2022-11-25 23:33:17,945 - PCNDATASET - INFO - Complete collecting files of the dataset. Total files: 5677
2022-11-25 23:33:17,950 - PCNDATASET - INFO - Collecting files of Taxonomy [ID=02958343, Name=car]
2022-11-25 23:33:17,952 - PCNDATASET - INFO - Complete collecting files of the dataset. Total files: 150
2022-11-25 23:33:17,956 - PCNDATASET - INFO - Collecting files of Taxonomy [ID=02958343, Name=car]
2022-11-25 23:33:17,956 - PCNDATASET - INFO - Complete collecting files of the dataset. Total files: 100
Fidelity is 0.000000
  0% 0/2401 [00:00<?, ?it/s]This item frame_0_car_0_000 CD 0.000751, MMD 0.000751
  0% 1/2401 [01:32<61:38:27, 92.46s/it]This item frame_0_car_1_001 CD 0.000675, MMD 0.000713
  0% 2/2401 [03:07<62:29:53, 93.79s/it]This item frame_0_car_2_002 CD 0.000782, MMD 0.000736
  0% 3/2401 [04:41<62:44:44, 94.20s/it]This item frame_0_car_3_003 CD 0.001340, MMD 0.000887
  0% 4/2401 [06:12<61:52:29, 92.93s/it]This item frame_0_car_4_004 CD 0.000650, MMD 0.000840
  0% 5/2401 [07:45<61:53:10, 92.98s/it]This item frame_0_car_5_005 CD 0.001018, MMD 0.000869
  0% 6/2401 [09:20<62:07:26, 93.38s/it]This item frame_0_car_6_006 CD 0.001714, MMD 0.000990
  0% 7/2401 [10:51<61:36:37, 92.65s/it]This item frame_100_car_0_007 CD 0.000980, MMD 0.000989
  0% 8/2401 [12:25<61:55:13, 93.15s/it]This item frame_100_car_10_008 CD 0.000596, MMD 0.000945
  0% 9/2401 [13:59<62:08:56, 93.54s/it]This item frame_100_car_1_009 CD 0.000617, MMD 0.000912
  0% 10/2401 [15:30<61:37:09, 92.78s/it]This item frame_100_car_2_010 CD 0.000608, MMD 0.000885
  0% 11/2401 [17:05<61:52:20, 93.20s/it]This item frame_100_car_3_011 CD 0.000697, MMD 0.000869
  0% 12/2401 [18:39<62:07:41, 93.62s/it]This item frame_100_car_4_012 CD 0.000535, MMD 0.000843
  1% 13/2401 [20:11<61:40:49, 92.99s/it]This item frame_100_car_5_013 CD 0.001599, MMD 0.000897
  1% 14/2401 [21:43<61:29:58, 92.75s/it]This item frame_100_car_6_014 CD 0.000935, MMD 0.000900

For the above output, I need to wait for 20 minutes to get 1% from 0%.
Are there any suggestions?
I take a look at this comment
I also look at this issue 12 and this issue 29
However, when I click [this] and [code], they point to an empty line and location.
I do not have any idea where I can put np.savetxt().

@Nevak1016
Copy link

@jackie174 Hi, did you use the yaml file to train PoinTr directly, or did you use the pth file trained from the PCN to finetune it? As per the paper, it seems to be finetuning using pth files trained from PCN.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants