Pointnet code reproduction (1)

1. Prerequisite preparation

Let me talk about my computer configuration first

Software:
linux16.04
anaconda+python3.6+tensorflow1.14
Hardware:
cpu 8GB

According to the official document: pointnet.github needs to install h5py first:

sudo apt-get install libhdf5-dev
sudo pip install h5py

Then download the pointnet source code, and the reproduction steps will be described in detail below.

2.pointnet classification network

2.1 Training
The data set used for classification is modelnet40, which contains 40 CAD models, which can be automatically downloaded to the data folder by running train.py. If the download fails, you can download the data set yourself.
The code default batchsize is 32. I used the CPU for training and the memory is limited, so I adjusted this parameter down. It is said that using pointnet_cls_basic can reduce training time (not verified yet).

cd pointnet
python train.py \
--batch_size=8 \
--max_epoch=250

2.2 tensorboard visualization

tensorboard --logdir log

2.3 Evaluation model and visual output error prediction

python evaluate.py --visu

Encountered an error:
ERROR

Probably means no module named scipy.misc

Check online because the version of scipy is too high (mine is 1.4), and it needs to be downgraded to scipy1.2. If you don’t want to downgrade, you can modify the source code:
In evaluate.py, change the original import scipy to import imageio (if you don’t have this library, you may need to install it) and
locate it to line 155, and change scipy.misc.imsave to imageio.imsave. solve.
Evaluation result:
Insert picture description hereVisualization uses some wrong predictions:
Insert picture description herethe name of this picture is label_desk_pred_dresser, as can be seen from the name, the desk is predicted as a cabinet.

Guess you like

Origin blog.csdn.net/qq_43265072/article/details/106521495