{"id":22190926,"url":"https://github.com/yuhexiong/cat-and-dog-classification-cnn-resnet50-python","last_synced_at":"2026-04-30T00:34:28.673Z","repository":{"id":214353332,"uuid":"733530766","full_name":"yuhexiong/cat-and-dog-classification-CNN-ResNet50-python","owner":"yuhexiong","description":"Cats and dogs images classifier using Python CNN ResNet50.","archived":false,"fork":false,"pushed_at":"2024-11-21T05:43:40.000Z","size":193,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-30T01:14:40.460Z","etag":null,"topics":["cnn","data-augmentation","python","resnet-50","tensorflow"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yuhexiong.png","metadata":{"files":{"readme":"README-CH.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2023-12-19T14:34:45.000Z","updated_at":"2024-11-21T05:43:44.000Z","dependencies_parsed_at":"2023-12-30T10:32:21.881Z","dependency_job_id":null,"html_url":"https://github.com/yuhexiong/cat-and-dog-classification-CNN-ResNet50-python","commit_stats":null,"previous_names":["yuhexiong/cat-and-dog-classification-cnn-resnet50-python"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuhexiong%2Fcat-and-dog-classification-CNN-ResNet50-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuhexiong%2Fcat-and-dog-classification-CNN-ResNet50-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuhexiong%2Fcat-and-dog-classification-CNN-ResNet50-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuhexiong%2Fcat-and-dog-classification-CNN-ResNet50-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yuhexiong","download_url":"https://codeload.github.com/yuhexiong/cat-and-dog-classification-CNN-ResNet50-python/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245351757,"owners_count":20601087,"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":["cnn","data-augmentation","python","resnet-50","tensorflow"],"created_at":"2024-12-02T12:13:25.753Z","updated_at":"2026-04-30T00:34:28.499Z","avatar_url":"https://github.com/yuhexiong.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Cat and Dog CNN with ResNet50\n\n### 資料集來源：[Kaggle - Cat and Dog](https://www.kaggle.com/datasets/tongpython/cat-and-dog)\n**注意**：由於資料集過大，無法直接包含在此。請從提供的 Kaggle 連結自行下載。\n\n使用 ResNet50 再自行疊加其他神經網路層，將貓咪與狗的圖片進行分類，最後倒出 2 個神經元，分別代表貓狗。  \n\n\n## Overview\n\n- Language: Python v3.10.12\n- Package: Tensorflow\n- Model: CNN(ResNet50)\n\n## Model Architecture\n\n模型使用 **Cross Entropy** 作為損失函數，採用 **Adam** 優化器，學習率設定為 **0.0001**，並應用 **數據擴增** 技術來減少過擬合，透過生成訓練圖像的變化來達成。  \n\n\n```\n              OPERATION        DATA DIMENSIONS   WEIGHTS(N)   WEIGHTS(%)\n\n              Input   #####       3  224  224\n         InputLayer     |      ----------------          0         0.0%\n                      #####       3  224  224\n      ResNet50 (Base)  \\|/     ----------------    2359808         1.7%\n               -      #####     512  224  224\n       MaxPooling2D   Y max    ----------------          0         0.0%\n                      #####     512  112  112\n      Convolution2D    \\|/     ----------------     147584         0.1%\n               relu   #####     128  112  112\n       MaxPooling2D   Y max    ----------------          0         0.0%\n                      #####     128   56   56\n           Flatten    |||||    ----------------          0         0.0%\n                      #####         50176\n              Dense   XXXXX    ----------------    1605696        74.3%\n               relu   #####          32\n           Dropout    |||||    ----------------          0         0.0%\n                      #####          32\n              Dense   XXXXX    ----------------         64         2.8%\n               relu   #####           2\n              Dense   XXXXX    ----------------         64         2.8%\n            softmax   #####           2\n```\n\n## Conclusion\n\n### Loss\n\n![Loss](./image/loss.png)\n\n### Accuracy\n\n![Accuracy](./image/accuracy.png)\n\n\n\n### Confusion Matrix - Accuracy Rate 97.53%\n\n![image](./image/confusion_matrix.png)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyuhexiong%2Fcat-and-dog-classification-cnn-resnet50-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyuhexiong%2Fcat-and-dog-classification-cnn-resnet50-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyuhexiong%2Fcat-and-dog-classification-cnn-resnet50-python/lists"}