{"id":37080289,"url":"https://github.com/taipingeric/fusionlab","last_synced_at":"2026-01-14T09:44:47.120Z","repository":{"id":64549163,"uuid":"575736830","full_name":"taipingeric/fusionlab","owner":"taipingeric","description":"An easy to use library and code snippets for PyTorch and Tensorflow","archived":false,"fork":false,"pushed_at":"2023-10-07T07:50:19.000Z","size":548,"stargazers_count":15,"open_issues_count":1,"forks_count":5,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-27T18:18:36.782Z","etag":null,"topics":["ai","deep-learning","python","pytorch","tensorflow"],"latest_commit_sha":null,"homepage":"https://fusionlab.readthedocs.io/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/taipingeric.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2022-12-08T07:22:59.000Z","updated_at":"2025-02-01T04:47:51.000Z","dependencies_parsed_at":"2022-12-10T18:29:10.245Z","dependency_job_id":null,"html_url":"https://github.com/taipingeric/fusionlab","commit_stats":{"total_commits":123,"total_committers":1,"mean_commits":123.0,"dds":0.0,"last_synced_commit":"a0044bba1482388be7cafae2ce27db0def6019c1"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/taipingeric/fusionlab","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taipingeric%2Ffusionlab","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taipingeric%2Ffusionlab/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taipingeric%2Ffusionlab/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taipingeric%2Ffusionlab/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/taipingeric","download_url":"https://codeload.github.com/taipingeric/fusionlab/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taipingeric%2Ffusionlab/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28416120,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T08:38:59.149Z","status":"ssl_error","status_checked_at":"2026-01-14T08:38:43.588Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["ai","deep-learning","python","pytorch","tensorflow"],"created_at":"2026-01-14T09:44:46.353Z","updated_at":"2026-01-14T09:44:47.114Z","avatar_url":"https://github.com/taipingeric.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FusionLab\n\n\u003cp align=\"center\"\u003e\n    \u003cbr\u003e\n    \u003cimg src=\"assets/imgs/fusionlab_banner.png\" width=\"400\"/\u003e\n    \u003cbr\u003e\n\u003cp\u003e\n\n[![PyPI version](https://badge.fury.io/py/fusionlab.svg)](https://badge.fury.io/py/fusionlab) ![Test](https://github.com/taipingeric/fusionlab/actions/workflows/python-app.yml/badge.svg)  [![Downloads](https://static.pepy.tech/badge/fusionlab)](https://pepy.tech/project/fusionlab)\n\n[![Documentation](https://img.shields.io/badge/view-Documentation-blue?style=for-the-badge)](https://fusionlab.readthedocs.io/)\n\nFusionLab is an open-source frameworks built for Deep Learning research written in PyTorch and Tensorflow. The code is easy to read and modify \nespecially for newbie. Feel free to send pull requests :D\n\n* [What's New](#news)\n* [Installation](#installation)\n* [How to use](#how-to-use)\n* [Encoders](#encoders)\n* [Losses](#losses)\n* [Segmentation](#segmentation)\n* [1D, 2D, 3D Model](#n-dimensional-model)\n* [Acknowledgements](#acknowledgements)\n      \n## Installation\n\n### With pip\n\n```bash\npip install fusionlab\n```\n\n#### For Mac M1 chip users\n[Install on Macbook M1 chip](./configs/Install%20on%20Macbook%20M1.md) \n\n## How to use\n\n```python\nimport fusionlab as fl\n\n# PyTorch\nencoder = fl.encoders.VGG16()\n# Tensorflow\nencoder = fl.encoders.TFVGG16()\n\n```\n\n## Documentation\n\n[Doc](https://fusionlab.readthedocs.io/en/latest/encoders.html)\n\n## Encoders\n\n[encoder list](fusionlab/encoders/README.md)\n\n## Losses\n\n[Loss func list](fusionlab/losses/README.md)\n* Dice Loss\n* Tversky Loss\n* IoU Loss\n\n\n```python\n# Dice Loss (Multiclass)\nimport fusionlab as fl\n\n# PyTorch\npred = torch.randn(1, 3, 4, 4) # (N, C, *)\ntarget = torch.randint(0, 3, (1, 4, 4)) # (N, *)\nloss_fn = fl.losses.DiceLoss()\nloss = loss_fn(pred, target)\n\n# Tensorflow\npred = tf.random.normal((1, 4, 4, 3), 0., 1.) # (N, *, C)\ntarget = tf.random.uniform((1, 4, 4), 0, 3) # (N, *)\nloss_fn = fl.losses.TFDiceLoss(\"multiclass\")\nloss = loss_fn(target, pred)\n\n\n# Dice Loss (Binary)\n\n# PyTorch\npred = torch.randn(1, 1, 4, 4) # (N, 1, *)\ntarget = torch.randint(0, 3, (1, 4, 4)) # (N, *)\nloss_fn = fl.losses.DiceLoss(\"binary\")\nloss = loss_fn(pred, target)\n\n# Tensorflow\npred = tf.random.normal((1, 4, 4, 1), 0., 1.) # (N, *, 1)\ntarget = tf.random.uniform((1, 4, 4), 0, 3) # (N, *)\nloss_fn = fl.losses.TFDiceLoss(\"binary\")\nloss = loss_fn(target, pred)\n\n\n```\n\n## Segmentation\n\n```python\nimport fusionlab as fl\n# PyTorch UNet\nunet = fl.segmentation.UNet(cin=3, num_cls=10)\n\n# Tensorflow UNet\n# Multiclass Segmentation\nunet = tf.keras.Sequential([\n   fl.segmentation.TFUNet(num_cls=10, base_dim=64),\n   tf.keras.layers.Activation(tf.nn.softmax),\n])\n\n# Binary Segmentation\nunet = tf.keras.Sequential([\n   fl.segmentation.TFUNet(num_cls=1, base_dim=64),\n   tf.keras.layers.Activation(tf.nn.sigmoid),\n])\n```\n\n[Segmentation model list](fusionlab/segmentation/README.md)\n\n* UNet\n* ResUNet\n* UNet2plus\n\n## N Dimensional Model\n\nsome models can be used in 1D, 2D, 3D\n\n```python\nimport fusionlab as fl\n\nresnet1d = fl.encoders.ResNet50V1(cin=3, spatial_dims=1)\nresnet2d = fl.encoders.ResNet50V1(cin=3, spatial_dims=2)\nresnet3d = fl.encoders.ResNet50V1(cin=3, spatial_dims=3)\n\nunet1d = fl.segmentation.UNet(cin=3, num_cls=10, spatial_dims=1)\nunet2d = fl.segmentation.UNet(cin=3, num_cls=10, spatial_dims=2)\nunet3d = fl.segmentation.UNet(cin=3, num_cls=10, spatial_dims=3)\n```\n\n## News\n\n[Release logs](./release_logs.md)\n\n## Acknowledgements\n\n* [BloodAxe/pytorch-toolbelt](https://github.com/BloodAxe/pytorch-toolbelt)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftaipingeric%2Ffusionlab","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftaipingeric%2Ffusionlab","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftaipingeric%2Ffusionlab/lists"}