Instructions to use grvsnh/brainscan-tfjs with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Keras
How to use grvsnh/brainscan-tfjs with Keras:
# !pip install -U keras tensorflow huggingface_hub # Keras needs TensorFlow installed to read "hf://" paths, so the tensorflow backend is selected here; # "jax" and "torch" also work for computation once TensorFlow is installed. import os os.environ["KERAS_BACKEND"] = "tensorflow" import keras model = keras.saving.load_model("hf://grvsnh/brainscan-tfjs") - Notebooks
- Google Colab
- Kaggle
BrainScan // DenseNet Brain Tumor Classification Model (TF.js format)
This repository contains the weights and topology of the BrainScan classification model converted to TensorFlow.js layers format for in-browser client-side execution.
Model Files
model.json: Patched TensorFlow.js Functional Model topology (Keras 3 compatible).group1-shard*of7.bin: Binary weights shards.model/brain_tumor_model.h5: The raw, pre-converted Keras H5 model.model/BrainScan_Model_Training.ipynb: Jupyter notebook containing the DenseNet model definition and training history.
Classes
The model classifies T1/T2 brain MRI scans into four distinct categories:
gliomameningiomanotumor(Normal)pituitary
Usage in TensorFlow.js
const model = await tf.loadLayersModel('https://huggingface.co/grvsnh/brainscan-tfjs/resolve/main/model.json');
const prediction = model.predict(imageTensor);
- Downloads last month
- -