Commit
•
7888599
1
Parent(s):
fd52d7c
Update app.py
Browse files
app.py
CHANGED
@@ -7,6 +7,7 @@ classes = {0: 'tench, Tinca tinca',1: 'goldfish, Carassius auratus',2: 'great wh
|
|
7 |
markdownn = '''
|
8 |
# Image Classification Pipeline with DeepSparse
|
9 |
Image classification is the task of identifying the type of object in an image and the corresponding confidence.
|
|
|
10 |
![Image classification](https://huggingface.co/spaces/neuralmagic/image-classification/resolve/main/class.png)
|
11 |
### What is DeepSparse?
|
12 |
DeepSparse is an inference runtime offering GPU-class performance on CPUs and APIs to integrate ML into your application. Sparsification is a powerful technique for optimizing models for inference, reducing the compute needed with a limited accuracy tradeoff. DeepSparse is designed to take advantage of model sparsity, enabling you to deploy models with the flexibility and scalability of software on commodity CPUs with the best-in-class performance of hardware accelerators, enabling you to standardize operations and reduce infrastructure costs.
|
@@ -17,6 +18,7 @@ The DeepSparse library provides an `image_classification` pipeline that you can
|
|
17 |
The pipeline enables you to choose a sparsified model from the [SparseZoo](https://sparsezoo.neuralmagic.com/).
|
18 |
SparseZoo contains models that have been pruned and quantized. They are, therefore, smaller than the original models. This makes them easier to deploy, especially on edge devices. These small classification models have the same accuracy as the original models but are faster and have a higher throughput.
|
19 |
Here is sample code for an Image Classification pipeline with the ResNet model.
|
|
|
20 |
```python
|
21 |
from deepsparse import Pipeline
|
22 |
pipeline = Pipeline.create(task="image_classification",
|
@@ -25,6 +27,7 @@ input_image = "my_image.png" # path to input image
|
|
25 |
inference = pipeline(input_image)
|
26 |
print(inference)
|
27 |
```
|
|
|
28 |
## Use Case Description
|
29 |
Image classification is applicable in scenarios where you are interested in only classifying an object in an image without localizing it.
|
30 |
For example, you can build an image classification model to classify products in a store.
|
|
|
7 |
markdownn = '''
|
8 |
# Image Classification Pipeline with DeepSparse
|
9 |
Image classification is the task of identifying the type of object in an image and the corresponding confidence.
|
10 |
+
|
11 |
![Image classification](https://huggingface.co/spaces/neuralmagic/image-classification/resolve/main/class.png)
|
12 |
### What is DeepSparse?
|
13 |
DeepSparse is an inference runtime offering GPU-class performance on CPUs and APIs to integrate ML into your application. Sparsification is a powerful technique for optimizing models for inference, reducing the compute needed with a limited accuracy tradeoff. DeepSparse is designed to take advantage of model sparsity, enabling you to deploy models with the flexibility and scalability of software on commodity CPUs with the best-in-class performance of hardware accelerators, enabling you to standardize operations and reduce infrastructure costs.
|
|
|
18 |
The pipeline enables you to choose a sparsified model from the [SparseZoo](https://sparsezoo.neuralmagic.com/).
|
19 |
SparseZoo contains models that have been pruned and quantized. They are, therefore, smaller than the original models. This makes them easier to deploy, especially on edge devices. These small classification models have the same accuracy as the original models but are faster and have a higher throughput.
|
20 |
Here is sample code for an Image Classification pipeline with the ResNet model.
|
21 |
+
|
22 |
```python
|
23 |
from deepsparse import Pipeline
|
24 |
pipeline = Pipeline.create(task="image_classification",
|
|
|
27 |
inference = pipeline(input_image)
|
28 |
print(inference)
|
29 |
```
|
30 |
+
|
31 |
## Use Case Description
|
32 |
Image classification is applicable in scenarios where you are interested in only classifying an object in an image without localizing it.
|
33 |
For example, you can build an image classification model to classify products in a store.
|