From e8d994a55016408c7578643b358b45274570a05a Mon Sep 17 00:00:00 2001 From: jiangjiahui Date: Fri, 12 Jul 2024 15:14:18 +0800 Subject: [PATCH] 2 --- README.md | 67 ++-------------------------------------------- flax_model.msgpack | 6 ++--- model.safetensors | 6 ++--- pytorch_model.bin | 6 ++--- tf_model.h5 | 6 ++--- 5 files changed, 14 insertions(+), 77 deletions(-) diff --git a/README.md b/README.md index e72576c..c639538 100644 --- a/README.md +++ b/README.md @@ -1,66 +1,3 @@ ---- -license: apache-2.0 -tags: -- vision -- image-classification -datasets: -- imagenet-1k ---- +# temp111 -# ResNet-50 v1.5 - -ResNet model pre-trained on ImageNet-1k at resolution 224x224. It was introduced in the paper [Deep Residual Learning for Image Recognition](https://arxiv.org/abs/1512.03385) by He et al. - -Disclaimer: The team releasing ResNet did not write a model card for this model so this model card has been written by the Hugging Face team. - -## Model description - -ResNet (Residual Network) is a convolutional neural network that democratized the concepts of residual learning and skip connections. This enables to train much deeper models. - -This is ResNet v1.5, which differs from the original model: in the bottleneck blocks which require downsampling, v1 has stride = 2 in the first 1x1 convolution, whereas v1.5 has stride = 2 in the 3x3 convolution. This difference makes ResNet50 v1.5 slightly more accurate (\~0.5% top1) than v1, but comes with a small performance drawback (~5% imgs/sec) according to [Nvidia](https://catalog.ngc.nvidia.com/orgs/nvidia/resources/resnet_50_v1_5_for_pytorch). - -![model image](https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/resnet_architecture.png) - -## Intended uses & limitations - -You can use the raw model for image classification. See the [model hub](https://huggingface.co/models?search=resnet) to look for -fine-tuned versions on a task that interests you. - -### How to use - -Here is how to use this model to classify an image of the COCO 2017 dataset into one of the 1,000 ImageNet classes: - -```python -from transformers import AutoImageProcessor, ResNetForImageClassification -import torch -from datasets import load_dataset - -dataset = load_dataset("huggingface/cats-image") -image = dataset["test"]["image"][0] - -processor = AutoImageProcessor.from_pretrained("microsoft/resnet-50") -model = ResNetForImageClassification.from_pretrained("microsoft/resnet-50") - -inputs = processor(image, return_tensors="pt") - -with torch.no_grad(): - logits = model(**inputs).logits - -# model predicts one of the 1000 ImageNet classes -predicted_label = logits.argmax(-1).item() -print(model.config.id2label[predicted_label]) -``` - -For more code examples, we refer to the [documentation](https://huggingface.co/docs/transformers/main/en/model_doc/resnet). - -### BibTeX entry and citation info - -```bibtex -@inproceedings{he2016deep, - title={Deep residual learning for image recognition}, - author={He, Kaiming and Zhang, Xiangyu and Ren, Shaoqing and Sun, Jian}, - booktitle={Proceedings of the IEEE conference on computer vision and pattern recognition}, - pages={770--778}, - year={2016} -} -``` +temp111 \ No newline at end of file diff --git a/flax_model.msgpack b/flax_model.msgpack index c9b8f23..ef54d59 100644 --- a/flax_model.msgpack +++ b/flax_model.msgpack @@ -1,3 +1,3 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:1dba0174a596673117b14b7b97d27bbfef1928a94377b18b4cb849b9c8569b90 -size 102450913 +version https://git-lfs.github.com/spec/v1 +oid sha256:1dba0174a596673117b14b7b97d27bbfef1928a94377b18b4cb849b9c8569b90 +size 102450913 diff --git a/model.safetensors b/model.safetensors index e4ee4cd..ca83e05 100644 --- a/model.safetensors +++ b/model.safetensors @@ -1,3 +1,3 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9c6061af1f450bb0847e529fd742aa5066017be379c71bbf5546b198e5b13a1e -size 102482854 +version https://git-lfs.github.com/spec/v1 +oid sha256:9c6061af1f450bb0847e529fd742aa5066017be379c71bbf5546b198e5b13a1e +size 102482854 diff --git a/pytorch_model.bin b/pytorch_model.bin index 7572107..cb04bcb 100644 --- a/pytorch_model.bin +++ b/pytorch_model.bin @@ -1,3 +1,3 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ff8163a1323333126706d649ce73ecd76e45d241b42d623dea6c723690cafe07 -size 102567489 +version https://git-lfs.github.com/spec/v1 +oid sha256:ff8163a1323333126706d649ce73ecd76e45d241b42d623dea6c723690cafe07 +size 102567489 diff --git a/tf_model.h5 b/tf_model.h5 index 6dd46cc..87d844f 100644 --- a/tf_model.h5 +++ b/tf_model.h5 @@ -1,3 +1,3 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:57afa67ca9f9aa1657f38f100f8e5c7fc49550dafa7226793b48dae4426f5a69 -size 102753944 +version https://git-lfs.github.com/spec/v1 +oid sha256:57afa67ca9f9aa1657f38f100f8e5c7fc49550dafa7226793b48dae4426f5a69 +size 102753944