File size: 1,049 Bytes
5d24f94
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
---

license: mit
pipeline_tag: image-classification
tags:
- image-classification
- pytorch
- appliances
datasets:
- GBooster/imclass-dataset
---


# ImClass Model

Классификатор изображений бытовой техники (5 классов):
laptop, refrigerator, smartphone, tv, washing_machine



## Использование



```python

from huggingface_hub import PyTorchModelHubMixin
import torch.nn as nn
from torchvision import models as tvm

class ImClassModel(nn.Module, PyTorchModelHubMixin):
    def __init__(self, num_classes=5):

        super().__init__()

        base = tvm.resnet18(weights=None)

        base.fc = nn.Linear(base.fc.in_features, num_classes)

        self.model = base

    def forward(self, x):

        return self.model(x)


model = ImClassModel.from_pretrained("GBooster/imclass-model")

model.eval()

```



## Обучающие данные



Модель обучена на [GBooster/imclass-dataset](https://huggingface.co/datasets/GBooster/imclass-dataset).