{"id":17614942,"url":"https://github.com/alekseynp/keras-torchvision","last_synced_at":"2025-06-10T22:03:41.558Z","repository":{"id":80553059,"uuid":"120366095","full_name":"alekseynp/keras-torchvision","owner":"alekseynp","description":null,"archived":false,"fork":false,"pushed_at":"2018-02-06T22:59:51.000Z","size":234,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-07T00:46:07.771Z","etag":null,"topics":["keras","neural-networks","pretrained-models","pytorch","tensorflow"],"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/alekseynp.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,"publiccode":null,"codemeta":null}},"created_at":"2018-02-05T21:48:19.000Z","updated_at":"2021-08-30T23:49:46.000Z","dependencies_parsed_at":null,"dependency_job_id":"ffe975e8-5f75-4d13-9acc-7e012db0e965","html_url":"https://github.com/alekseynp/keras-torchvision","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/alekseynp%2Fkeras-torchvision","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alekseynp%2Fkeras-torchvision/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alekseynp%2Fkeras-torchvision/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alekseynp%2Fkeras-torchvision/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alekseynp","download_url":"https://codeload.github.com/alekseynp/keras-torchvision/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alekseynp%2Fkeras-torchvision/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259159622,"owners_count":22814491,"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":["keras","neural-networks","pretrained-models","pytorch","tensorflow"],"created_at":"2024-10-22T18:57:44.504Z","updated_at":"2025-06-10T22:03:41.530Z","avatar_url":"https://github.com/alekseynp.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# keras-torchvision\n\nConvert the pretrained resnet models from Pytorch's torchvision module for use in Keras with the Tensorflow backend (resnet18, resnet34, resnet50, resnet101, resnet152)\n\nDivided into two scripts, using numpy files as an interchange medium. This makes it possible to have Pytorch and Tensorflow in two different environments.\n\nConverts with anal attention to detail, matching activations at each layer. Picky about how 'same' padding is implemented.\n\n`torchvision_resnet.py` implemented to read very similarly to `pytorch/vision/torchvision/models/resnet.py`\n\nUsage:\n\n```\npython resnet_pytorch_to_numy.py 18\npython resnet_numpy_to_keras.py 18\n\npython\nimport keras\nkeras.load_model('resnet18.h5')\n```\n\nValidation:\n\n![Test Image](test_image.png)\n\n![Resnet18](resnet18.png)\n![Resnet34](resnet34.png)\n![Resnet50](resnet50.png)\n![Resnet101](resnet101.png)\n![Resnet152](resnet152.png)\n\n\nTested:\n- Kears 2.1.2\n- Tensorflow 1.4.1\n- Pytorch 0.2.0_3\n- Cuda 7.5\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falekseynp%2Fkeras-torchvision","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falekseynp%2Fkeras-torchvision","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falekseynp%2Fkeras-torchvision/lists"}