Skip to content

rishabhdotgupta/CloserLookFewShot_3D

 
 

Repository files navigation

Few-shot Learning for 3D Shape Classification

In this project, we perform a detailed empirical study of 3d shape classification under few-shot setting using common 3D architectures, datasets and few-shot techniques.

Enviroment

Getting started

ModelNet40 - Voxels

  • Change directory to ./filelists/ModelNet40_voxels
  • download and unzip ModelNet40.zip from (https://modelnet.cs.princeton.edu/)
  • use utils/binvox_convert.py to convert this data to voxel format

ModelNet40 - Multi-view Images

ModelNet40 - Point Clouds

Self-defined setting

  • Require three data split json file: 'base.json', 'val.json', 'novel.json' for each dataset
  • The format should follow
    {"label_names": ["class0","class1",...], "image_names": ["filepath1","filepath2",...],"image_labels":[l1,l2,l3,...]}
  • See utils/create_json.ipynb on how to generate these files for ModelNet40 dataset. Update data_dir['DATASETNAME'] in configs.py.

Train

In general, run python ./train.py --dataset [DATASETNAME] --model [BACKBONENAME] --method [METHODNAME] [--OPTIONARG]

Specifically, below are some examples to run experiments on ModelNet40 dataset using different architectures and few-shot techniques:

  • VoxNet: python ./train.py --dataset modelnet40_voxels --method protonet --voxelized
  • MVCNN: python ./train.py --dataset modelnet40_views --model Conv4 --method maml --num_views 12
  • PointNet: python ./train.py --dataset modelnet40_points --method baseline --num_points 1024 Similarly, you can use other 3D datasets. Please refer to io_utils.py for additional options.

References

We have modified and built upon the following publicly available code:

About

Few-Shot Learning for 3D shape classification

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 71.2%
  • Jupyter Notebook 27.4%
  • Shell 1.4%