{"id":13738171,"url":"https://github.com/vandit15/Class-balanced-loss-pytorch","last_synced_at":"2025-05-08T16:32:33.365Z","repository":{"id":40596883,"uuid":"205512270","full_name":"vandit15/Class-balanced-loss-pytorch","owner":"vandit15","description":"Pytorch implementation of the paper \"Class-Balanced Loss Based on Effective Number of Samples\"","archived":false,"fork":false,"pushed_at":"2024-02-18T05:57:18.000Z","size":161,"stargazers_count":775,"open_issues_count":16,"forks_count":120,"subscribers_count":11,"default_branch":"master","last_synced_at":"2024-08-04T03:12:00.152Z","etag":null,"topics":["computer-vision","cvpr2019","deep-learning","loss-functions","pytorch"],"latest_commit_sha":null,"homepage":null,"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/vandit15.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,"roadmap":null,"authors":null,"dei":null}},"created_at":"2019-08-31T07:34:08.000Z","updated_at":"2024-07-12T07:09:01.000Z","dependencies_parsed_at":"2024-04-20T17:04:13.224Z","dependency_job_id":null,"html_url":"https://github.com/vandit15/Class-balanced-loss-pytorch","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vandit15%2FClass-balanced-loss-pytorch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vandit15%2FClass-balanced-loss-pytorch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vandit15%2FClass-balanced-loss-pytorch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vandit15%2FClass-balanced-loss-pytorch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vandit15","download_url":"https://codeload.github.com/vandit15/Class-balanced-loss-pytorch/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224746393,"owners_count":17363037,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["computer-vision","cvpr2019","deep-learning","loss-functions","pytorch"],"created_at":"2024-08-03T03:02:13.217Z","updated_at":"2024-11-15T07:30:29.766Z","avatar_url":"https://github.com/vandit15.png","language":"Python","funding_links":[],"categories":["Python","Classification"],"sub_categories":[],"readme":"# Class-balanced-loss-pytorch\nPytorch implementation of the paper\n[Class-Balanced Loss Based on Effective Number of Samples](https://arxiv.org/abs/1901.05555) presented at CVPR'19.\n\n\n[Yin Cui](https://ycui.me/), Menglin Jia, [Tsung-Yi Lin](https://vision.cornell.edu/se3/people/tsung-yi-lin/)(Google Brain), [Yang Song](https://ai.google/research/people/author38270)(Google), [Serge Belongie](http://blogs.cornell.edu/techfaculty/serge-belongie/)\n\n## Dependencies\n- Python (\u003e=3.6)\n- Pytorch (\u003e=1.2.0)\n\n## Review article of the paper\n[Medium Article](https://medium.com/@vandit_15/handling-class-imbalanced-data-using-a-loss-specifically-made-for-it-6e58fd65ffab?source=friends_link\u0026sk=ac09ea6061990ead2a2f90e3767ae91f)\n\n## How it works\n\nIt works on the principle of calculating effective number of samples for all classes which is defined as:\n\n![alt-text](https://github.com/vandit15/Class-balanced-loss-pytorch/blob/master/samples.png)\n\nThus, the loss function is defined as:\n\n![alt-text](https://github.com/vandit15/Class-balanced-loss-pytorch/blob/master/loss.png)\n\nVisualisation for effective number of samples\n\n\n![alt-text](https://github.com/vandit15/Class-balanced-loss-pytorch/blob/master/image.png \"Visualisation for effective number of samples\")\n\n## References\n\n[official tensorflow implementation](https://github.com/richardaecn/class-balanced-loss)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvandit15%2FClass-balanced-loss-pytorch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvandit15%2FClass-balanced-loss-pytorch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvandit15%2FClass-balanced-loss-pytorch/lists"}