{"id":19380297,"url":"https://github.com/jlgregorio/pointnet-keras","last_synced_at":"2026-04-18T19:32:45.845Z","repository":{"id":232837458,"uuid":"785285429","full_name":"jlgregorio/pointnet-keras","owner":"jlgregorio","description":"Custom implementation of PointNet classifier using Keras 3","archived":false,"fork":false,"pushed_at":"2024-11-27T10:12:21.000Z","size":182277,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-14T23:47:48.776Z","etag":null,"topics":["keras","point-cloud","pointnet"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jlgregorio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-04-11T15:20:26.000Z","updated_at":"2024-11-27T10:12:25.000Z","dependencies_parsed_at":"2025-02-24T16:57:22.129Z","dependency_job_id":null,"html_url":"https://github.com/jlgregorio/pointnet-keras","commit_stats":null,"previous_names":["jlgregorio/pointnet_custom_keras","jlgregorio/pointnet-keras"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jlgregorio/pointnet-keras","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jlgregorio%2Fpointnet-keras","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jlgregorio%2Fpointnet-keras/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jlgregorio%2Fpointnet-keras/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jlgregorio%2Fpointnet-keras/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jlgregorio","download_url":"https://codeload.github.com/jlgregorio/pointnet-keras/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jlgregorio%2Fpointnet-keras/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31982663,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T17:30:12.329Z","status":"ssl_error","status_checked_at":"2026-04-18T17:29:59.069Z","response_time":103,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["keras","point-cloud","pointnet"],"created_at":"2024-11-10T09:13:33.026Z","updated_at":"2026-04-18T19:32:45.811Z","avatar_url":"https://github.com/jlgregorio.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PointNet implementation using Keras 3\n\nThis is a (yet another) custom implementation of the well-known PointNet model for pointcloud classification. This has been coded with the objective to keep things as simple as possible, limiting the use of third-party libraries and making the most of the Keras API (theoretically \"backend-agnostic\").\n\n## Getting started\n\n### Dependencies\n\nThe code has mainly been developed and tested with `python` 3.9, `numpy` 1.26, and `keras` 3.3 with `tensorflow` 2.16 as backend.\n\nDependencies have been installed via conda with\n\n    conda install tensorflow-gpu -c conda-forge\n\nalthough Tensorflow 2 is preferably installed using pip with\n\n    pip install --upgrade pip\n    pip install tensorflow\n\nBoth commands also install Keras and Numpy at the same time.\n\nThanks to Keras this code also works with other supported backends, i.e. PyTorch and JAX. It has been sucessfully tested with `torch` 2.3.\n\n### Training\n\nPointNet is often trained on the ModelNet40 dataset, which has also been chosen here. An already trained model is included in `models/saved` folder (see below for usage). An **accuracy of about 85 %** (slightly lower than the original implementation) has been obtained on the test set (see below for details about ModelNet40).\n\n\u003cdiv align=\"center\"\u003e\n  \u003cp\u003e\u003cimg src=\"docs/training_curves.png\"\u003e\u003c/p\u003e\n  \u003cp\u003eTraining on ModelNet40\u003c/p\u003e\n\u003c/div\u003e\n\nThe `train_model.py` file may be re-used for futher experimentations (see below for data preparation).\n\nIn detail, the use of a custom training loop has been avoided. The *learning rate* and *batch normalization momentum* are updated during training (in accordance with the original paper/implementation) by relying on Callbacks (`keras.callbacks.Callback`). The training data are augmented \"on the fly\" (also in accordance with the original paper/implementation) by implementing a custom data generator (`keras.utils.PyDataset`).\n\n### Predicting\n\nThe `predict_example.py` file provides a minimal example for prediction.\n\n\u003cdiv align=\"center\"\u003e\n  \u003cp\u003e\u003cimg src=\"docs/pred_example.png\"\u003e\u003c/p\u003e\n  \u003cp\u003eExample of prediction\u003c/p\u003e\n\u003c/div\u003e\n\nIn detail, using the Keras API allows to save and load models (configuration, weights, etc.) quite easily. \n\n### Data preparation\n\nData often have to be preprocessed before training, which is the case for the ModelNet40 dataset. The `modelnet40.py` in the `data` folder contains all the preprocessing steps carried here. Just download the ModelNet40 dataset (put it in `data/ModelNet40` by default) and run the file. This will create a HDF5 file and save it in `data/ModelNet40_preprocessed`.\n\nIn detail, a pointcloud (consisting of *n* points, optionally with normals) is sampled from the faces of each mesh contained in the ModelNet40 dataset. Pointclouds are normalized into a unit sphere. A data augmentation step is performed during training (randomly rotating along the up axis, jittering the position of each point by gaussian noise and shuffling the points).\n\n## About\n\n### PointNet\n\nThe PointNet classification network (the upper part of the figure shown below) takes a pointcloud of *n* points as input and outputs a classification score for *m* classes. \n\n\u003cdiv align=\"center\"\u003e\n  \u003cp\u003e\u003cimg src=\"docs/pointnet.jpg\"\u003e\u003c/p\u003e\n  \u003cp\u003ePointNet architecture\u003c/p\u003e\n\u003c/div\u003e\n\nSee the [PointNet project page](https://stanford.edu/~rqi/pointnet/) for more details about Pointnet.\n\n### ModelNet40\n\nModelNet40 consists of 12,311 CAD-generated meshes distributed over 40 categories/classes (of \"common\" objects such as airplane, car, plant, lamp, etc.). A large portion of these meshes (9,843 to be exact) is used for training and a smaller portion (2,468 to be exact) is reserved for testing.\n\nSee the [ModelNet project page](https://modelnet.cs.princeton.edu/) for more details about ModelNet40 and access to the data.\n\n## Aknowledgement\n\nThis work was greatly inspired by previous PointNet implementations, such as:\n* [The orginal one](https://github.com/charlesq34/pointnet) by Charles R. Qi et al. (using Python 2.7 \u0026 TensorFlow 1.0)\n* [This one](https://github.com/luis-gonzales/pointnet_own) by Luis R. Gonzales (using Python 3.x \u0026 TensorFlow 2.0)\n* [This one](https://www.tensorflow.org/graphics/api_docs/python/tfg/nn/layer/pointnet) (partial) found in the TensorFlow Graphics module\n\nIn addition to the Tensorflow/Keras official online documentation, the book *Hands-On Machine Learning with Scikit-Learn, Keras, and TensorFlow: Concepts, Tools, and Techniques to Build Intelligent Systems (2nd Edition)* by Aurélien Géron was of a great help and another major source of inspiration.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjlgregorio%2Fpointnet-keras","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjlgregorio%2Fpointnet-keras","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjlgregorio%2Fpointnet-keras/lists"}