# fpointnet **Repository Path**: nj_wang_wenbo/fpointnet ## Basic Information - **Project Name**: fpointnet - **Description**: frustum-pointnets - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2022-10-24 - **Last Updated**: 2022-10-26 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Contents - [Contents](#contents) - [frustum_pointnets_mindspore](#frustum_pointnets_mindspore) - [Requirements](#Requirements) - [Prepare_Training_Data](#Prepare_Training_Data) - [Project_structure](#Project_structure) - [Train](#train) - [Test](#Test) # frustum_pointnets_mindspore A mindspore version of [frustum-pointnets](https://github.com/charlesq34/frustum-pointnets) main function of frustum_pointnets: ```angular2 train.py, eval.py, train/provider.py, src/frustum_pointnets_v1.py src/model_util.py kitti/* ``` # Requirements Ubuntu-18.04 CUDA-11 mindspore 1.8 python 3.9 # Prepare_Training_Data KITTI Dataset:http://www.cvlibs.net/datasets/kitti/eval_object.php?obj_benchmark the sub-sets of data Of KITTI: image_2:https://s3.eu-central-1.amazonaws.com/avg-kitti/data_object_image_2.zip label_2:https://s3.eu-central-1.amazonaws.com/avg-kitti/data_object_label_2.zip velodyne:https://s3.eu-central-1.amazonaws.com/avg-kitti/data_object_velodyne.zip calib:https://s3.eu-central-1.amazonaws.com/avg-kitti/data_object_calib.zip Download KITTI 3D object detection data and organize the folders as follows: ```angular2 . ├── dataset │ ├── KITTI │ │ ├── rgb_detections │ │ │ ├──training │ │ │ | ├──calib | | | | ├──velodyne | | | | ├──label_2 | | | | ├──image_2 | | | | ├──(optional: planes) │ │ │ ├──testing │ │ │ | ├──calib | | | | ├──velodyne | | | | ├──label_2 | | | | ├──image_2 │ ``` Generate training samples from raw files: ```angular2 python kitti/prepare_data.py --gen_train --gen_val --gen_val_rgb_detection --car_only ``` or Download the [packaged](https://pan.baidu.com/s/1uNq91d1klrweMa3eSOSdNw?pwd=fm5d) file and put the pickle files under /dataset: # Project_structure ```angular2 . │ eval.py │ rank_table_2pcs.json │ README.md │ train.py │ ├─kitti │ │ kitti_object.py │ │ kitti_util.py │ │ prepare_data.py │ │ │ ├─image_sets │ │ test.txt │ │ train.txt │ │ trainval.txt │ │ val.txt │ │ │ └─rgb_detections │ rgb_detection_train.txt │ rgb_detection_val.txt │ ├─scripts │ run_distribution_ascend.sh │ ├─src │ datautil.py │ frustum_pointnets_v1.py │ model_util.py │ └─train box_util.py convert.py provider.py ``` # Train ```bash step1: bash scripts/run_distribution_ascend.sh [RANK_TABLE_FILE] step2: python eval.py --target 'keep_one' ``` ## Train log step1 ```angular2 start train ... init environment ... device_num:8, rank_id:0 2022-10-19T09:26:37.721182:loading train dataset ... 2022-10-19T09:26:41.325025:construct net ... epoch: 1 step: 100, loss is 46.78062438964844 epoch: 1 step: 200, loss is 18.396862030029297 Train epoch time: 168754.465 ms, per step time: 730.539 ms epoch: 2 step: 69, loss is 26.49061393737793 epoch: 2 step: 169, loss is 19.57318878173828 Train epoch time: 113103.595 ms, per step time: 489.626 ms ... . . . ... train down! ``` ## Train log step2 ```angular2 Acc:8.84 Delete:log/Fpointnet_20221019_0914/fpoint_v1-2_231.ckpt Acc:38.46 Delete:log/Fpointnet_20221019_0914/fpoint_v1-4_231.ckpt Acc:15.52 Delete:log/Fpointnet_20221019_0914/fpoint_v1-3_231.ckpt Acc:16.65 Delete:log/Fpointnet_20221019_0914/fpoint_v1-1_231.ckpt Acc:67.71 Delete:log/Fpointnet_20221019_0926/fpoint_v1-163_231.ckpt Acc:27.84 Delete:log/Fpointnet_20221019_0926/fpoint_v1-2_231.ckpt ... . . . ``` # Test ```bash python eval.py --model_path [CKPT_PATH] ``` ## Test log ```angular2 Number of point clouds: 12538 segmentation accuracy 0.8969611287934679 box IoU(ground) 0.7755848700054374 box IoU(3D) 0.7211546932116405 box estimation accuracy (IoU=0.7) 0.7359036528951986 Average pos ratio: 0.436471 Average pos prediction ratio: 0.462065 Average npoints: 1024.000000 Mean points: x0.025841 y0.987336 z24.954839 Max points: x17.198647 y9.372097 z79.747406 Min points: x-20.042944 y-3.882158 z0.000000 {'Average pos ratio:': 0.43647078506340725, 'Average pos prediction ratio:': 0.46206524353465467, 'Average npoints:': 1024.0, 'Mean points:': array([ 0.02584073, 0.98733621, 24.95483863]), 'Max points:': array([17.19864655, 9.37209702, 79.74740601]), 'Min points:': array([-20.04294395, -3.8821578 , 0. ])} ```