Image Segmentation
Keras
ONNX
English
Chinese
Keras
TF-Keras
Safetensors
TensorFlow
biology
agriculture
weeds
vegetation
camouflage
deep learning
imagery
segmentation
medical
forest fire
wildfire
fuel
Instructions to use markrodrigo/vegetation-image-segmentation with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Keras
How to use markrodrigo/vegetation-image-segmentation 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://markrodrigo/vegetation-image-segmentation") - Notebooks
- Google Colab
- Kaggle
|
Download README.md from markrodrigo/vegetation-image-segmentation: direct link, hf CLI and curl.
- Browser
- Download file 4.91 kB
-
https://huggingface.co/markrodrigo/vegetation-image-segmentation/resolve/main/README.md
- Command line
-
hf download hf://markrodrigo/vegetation-image-segmentation/README.md
-
curl -L -o README.md https://huggingface.co/markrodrigo/vegetation-image-segmentation/resolve/main/README.md
4.91 kB
| license: cc-by-nc-sa-4.0 | |
| language: | |
| - en | |
| - zh | |
| metrics: | |
| - accuracy | |
| pipeline_tag: image-segmentation | |
| tags: | |
| - Keras | |
| - TF-Keras | |
| - Safetensors | |
| - TensorFlow | |
| - biology | |
| - agriculture | |
| - weeds | |
| - vegetation | |
| - camouflage | |
| - deep learning | |
| - imagery | |
| - segmentation | |
| - medical | |
| - forest fire | |
| - wildfire | |
| - fuel | |
|  | |
| ### Model Information - fire火-fuel薪-vegetation植被-image-segmentation-1.0 | |
| - Red Green Blue (RGB) binary segmentation of particular vegetation in leaf. Shrub or tree applications. | |
| </br> | |
| 植被叶片的红、绿、蓝二元分割。 | |
| </br> | |
| - Likely medical applications as the model was originally designed for. | |
| </br> | |
| 该模型最初很可能是为医疗应用而设计的。 | |
| </br> | |
| - Originally trained to specific species. Semantically segmented for accuracy. | |
| </br> | |
| 最初针对特定物种进行训练。为了提高准确性,进行了语义分割。 | |
| </br> | |
| - Keras / Tensorflow .h5 supervised model. | |
| </br> | |
| - Opportunities are to transfer learn or further fine-tune with LoRA, etc. | |
| </br> | |
| 使用 LoRA 进行迁移学习或进一步微调的机会 | |
| </br> | |
| - Data sources are proprietary via hand drawn masked samples. | |
| </br> | |
| 数据源是通过手绘的掩蔽样本专有的。 | |
| </br> | |
| - Some extrapolation of source data to synthetic data. | |
| </br> | |
| 将一些源数据推断为合成数据。 | |
| </br> | |
| - Novel applications – require specific vegetation imagery. | |
| </br> | |
| 新颖的应用——需要特定的植被图像。 | |
| </br> | |
| - Other applications - Vegetation 2D area calculations. Wildfire / fire fuel. Land Cover change. Medical. Line clearing. Noxious weeds. Environmental assessments. Camouflage object detection. | |
| </br> | |
| 其他应用 - 植被 2D 面积计算。野火/火灾燃料。土地覆盖变化。医疗。线路清理。有害杂草。环境评估。伪装物体检测。 | |
| </br> | |
|  | |
| **Forest Fire Fuel** | |
| </br> | |
| LoRA adapter of base segmentation vegetation model. | |
| </br> | |
| **Example - Model Not currently available.** | |
| </br> | |
| Moderate to extreme beetle kill. | |
| </br> | |
| Colorado coniferous forest fuel source. | |
|  | |
| </br> | |
| USFS fire severity for area. | |
|  | |
| LoRA adapted fuel layer overlaying USFS fire severity. | |
|  | |
| **Model developer**: Mark Rodrigo | |
| **Associated code**: https://github.com/mprodrigo - coming soon | |
| **Model Architecture**: Modified U-Net | |
| ### Model Input / Output Overview: | |
| - Input: 256, 256, 3 | |
| - Output: 256, 256, 1 | |
| ### Training Source Tile Example | |
|  | |
| ### Training Source Tile Histogram | |
|  | |
| ### Further Reference | |
| TODO | |
| ### Example Code | |
| **Keras** | |
| </br> | |
| import keras | |
| model = keras.models.load_model('../model/image-segmentation-vegetation-1.0.keras') | |
| </br> | |
| model.summary() | |
| </br> | |
| or | |
| </br> | |
| import keras | |
| loaded_model = keras.models.load_model('/home/phantom/Projects/agverde/data/product/Agverde/z1/model/image-segmentation-vegetation-1.0.h5') | |
| </br> | |
| loaded_model.summary() | |
| **TensorFlow** | |
| </br> | |
| https://www.tensorflow.org/tutorials/keras/save_and_load | |
| ### Evaluation / Accuracy of Target Vegetation | |
| Rand Index: .92 - .96 (geographic latitude and regional vegetation color variations) | |
| ### Training and Validation data | |
| - 3840 256x256 RGB images and corresponding 256x256 binary mask images | |
| - ~ 1/3 allocated to validation | |
| - Separate test sets by latitude and region. Target species has regional color variations. | |
| ### Training hyperparameters | |
| The following hyperparameters were used during training: | |
| - learning_rate: 1e-04 | |
| - train_batch_size: 8 | |
| - eval_batch_size: 3 | |
| - distributed_type: multi-GPU | |
| - num_devices: 2 | |
| - batch steps: 60 | |
| - eval steps: 9 | |
| - optimizer: Adam | |
| - num_epochs: 8 | |
| ### Training results | |
| | Training Loss | Epoch | Training Accuracy | | |
| |:-------------:|:------:|:-----------------:| | |
| | 0.4718 | 1 | 0.8227 | | |
| | 0.3869 | 2 | 0.8328 | | |
| | 0.3770 | 3 | 0.8403 | | |
| | 0.2557 | 4 | 0.8562 | | |
| | 0.2432 | 5 | 0.8587 | | |
| | 0.0856 | 6 | 0.9557 | | |
| | 0.0338 | 7 | 0.9870 | | |
| | 0.0303 | 8 | 0.9891 | | |
| ### Framework versions | |
| Keras 3.6.0 | |
| </br> | |
| Tensorflow 2.16.2 |