@huggingface/tasks 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (103) hide show
  1. package/assets/audio-classification/audio.wav +0 -0
  2. package/assets/audio-to-audio/input.wav +0 -0
  3. package/assets/audio-to-audio/label-0.wav +0 -0
  4. package/assets/audio-to-audio/label-1.wav +0 -0
  5. package/assets/automatic-speech-recognition/input.flac +0 -0
  6. package/assets/automatic-speech-recognition/wav2vec2.png +0 -0
  7. package/assets/contribution-guide/anatomy.png +0 -0
  8. package/assets/contribution-guide/libraries.png +0 -0
  9. package/assets/depth-estimation/depth-estimation-input.jpg +0 -0
  10. package/assets/depth-estimation/depth-estimation-output.png +0 -0
  11. package/assets/document-question-answering/document-question-answering-input.png +0 -0
  12. package/assets/image-classification/image-classification-input.jpeg +0 -0
  13. package/assets/image-segmentation/image-segmentation-input.jpeg +0 -0
  14. package/assets/image-segmentation/image-segmentation-output.png +0 -0
  15. package/assets/image-to-image/image-to-image-input.jpeg +0 -0
  16. package/assets/image-to-image/image-to-image-output.png +0 -0
  17. package/assets/image-to-image/pix2pix_examples.jpg +0 -0
  18. package/assets/image-to-text/savanna.jpg +0 -0
  19. package/assets/object-detection/object-detection-input.jpg +0 -0
  20. package/assets/object-detection/object-detection-output.jpg +0 -0
  21. package/assets/table-question-answering/tableQA.jpg +0 -0
  22. package/assets/text-to-image/image.jpeg +0 -0
  23. package/assets/text-to-speech/audio.wav +0 -0
  24. package/assets/text-to-video/text-to-video-output.gif +0 -0
  25. package/assets/unconditional-image-generation/unconditional-image-generation-output.jpeg +0 -0
  26. package/assets/video-classification/video-classification-input.gif +0 -0
  27. package/assets/visual-question-answering/elephant.jpeg +0 -0
  28. package/assets/zero-shot-image-classification/image-classification-input.jpeg +0 -0
  29. package/dist/index.cjs +3105 -0
  30. package/dist/index.d.cts +145 -0
  31. package/dist/index.d.ts +145 -0
  32. package/dist/index.js +3079 -0
  33. package/package.json +35 -0
  34. package/src/Types.ts +58 -0
  35. package/src/audio-classification/about.md +85 -0
  36. package/src/audio-classification/data.ts +77 -0
  37. package/src/audio-to-audio/about.md +55 -0
  38. package/src/audio-to-audio/data.ts +63 -0
  39. package/src/automatic-speech-recognition/about.md +86 -0
  40. package/src/automatic-speech-recognition/data.ts +77 -0
  41. package/src/const.ts +51 -0
  42. package/src/conversational/about.md +50 -0
  43. package/src/conversational/data.ts +62 -0
  44. package/src/depth-estimation/about.md +38 -0
  45. package/src/depth-estimation/data.ts +52 -0
  46. package/src/document-question-answering/about.md +54 -0
  47. package/src/document-question-answering/data.ts +67 -0
  48. package/src/feature-extraction/about.md +35 -0
  49. package/src/feature-extraction/data.ts +57 -0
  50. package/src/fill-mask/about.md +51 -0
  51. package/src/fill-mask/data.ts +77 -0
  52. package/src/image-classification/about.md +48 -0
  53. package/src/image-classification/data.ts +88 -0
  54. package/src/image-segmentation/about.md +63 -0
  55. package/src/image-segmentation/data.ts +96 -0
  56. package/src/image-to-image/about.md +81 -0
  57. package/src/image-to-image/data.ts +97 -0
  58. package/src/image-to-text/about.md +58 -0
  59. package/src/image-to-text/data.ts +87 -0
  60. package/src/index.ts +2 -0
  61. package/src/object-detection/about.md +36 -0
  62. package/src/object-detection/data.ts +73 -0
  63. package/src/placeholder/about.md +15 -0
  64. package/src/placeholder/data.ts +18 -0
  65. package/src/question-answering/about.md +56 -0
  66. package/src/question-answering/data.ts +69 -0
  67. package/src/reinforcement-learning/about.md +176 -0
  68. package/src/reinforcement-learning/data.ts +78 -0
  69. package/src/sentence-similarity/about.md +97 -0
  70. package/src/sentence-similarity/data.ts +100 -0
  71. package/src/summarization/about.md +57 -0
  72. package/src/summarization/data.ts +72 -0
  73. package/src/table-question-answering/about.md +43 -0
  74. package/src/table-question-answering/data.ts +63 -0
  75. package/src/tabular-classification/about.md +67 -0
  76. package/src/tabular-classification/data.ts +69 -0
  77. package/src/tabular-regression/about.md +91 -0
  78. package/src/tabular-regression/data.ts +58 -0
  79. package/src/tasksData.ts +104 -0
  80. package/src/text-classification/about.md +171 -0
  81. package/src/text-classification/data.ts +90 -0
  82. package/src/text-generation/about.md +128 -0
  83. package/src/text-generation/data.ts +124 -0
  84. package/src/text-to-image/about.md +65 -0
  85. package/src/text-to-image/data.ts +88 -0
  86. package/src/text-to-speech/about.md +63 -0
  87. package/src/text-to-speech/data.ts +70 -0
  88. package/src/text-to-video/about.md +36 -0
  89. package/src/text-to-video/data.ts +97 -0
  90. package/src/token-classification/about.md +78 -0
  91. package/src/token-classification/data.ts +83 -0
  92. package/src/translation/about.md +65 -0
  93. package/src/translation/data.ts +68 -0
  94. package/src/unconditional-image-generation/about.md +45 -0
  95. package/src/unconditional-image-generation/data.ts +66 -0
  96. package/src/video-classification/about.md +53 -0
  97. package/src/video-classification/data.ts +84 -0
  98. package/src/visual-question-answering/about.md +43 -0
  99. package/src/visual-question-answering/data.ts +90 -0
  100. package/src/zero-shot-classification/about.md +39 -0
  101. package/src/zero-shot-classification/data.ts +66 -0
  102. package/src/zero-shot-image-classification/about.md +68 -0
  103. package/src/zero-shot-image-classification/data.ts +79 -0
@@ -0,0 +1,53 @@
1
+ ## Use Cases
2
+ Video classification models can be used to categorize what a video is all about.
3
+
4
+ ### Activity Recognition
5
+ Video classification models are used to perform activity recognition which is useful for fitness applications. Activity recognition is also helpful for vision-impaired individuals especially when they're commuting.
6
+
7
+ ### Video Search
8
+ Models trained in video classification can improve user experience by organizing and categorizing video galleries on the phone or in the cloud, on multiple keywords or tags.
9
+
10
+ ## Inference
11
+
12
+ Below you can find code for inferring with a pre-trained video classification model.
13
+
14
+ ```python
15
+ from transformers import VideoMAEFeatureExtractor, VideoMAEForVideoClassification
16
+ from pytorchvideo.transforms import UniformTemporalSubsample
17
+ from pytorchvideo.data.encoded_video import EncodedVideo
18
+
19
+
20
+ # Load the video.
21
+ video = EncodedVideo.from_path("path_to_video.mp4")
22
+ video_data = video.get_clip(start_sec=0, end_sec=4.0)["video"]
23
+
24
+ # Sub-sample a fixed set of frames and convert them to a NumPy array.
25
+ num_frames = 16
26
+ subsampler = UniformTemporalSubsample(num_frames)
27
+ subsampled_frames = subsampler(video_data)
28
+ video_data_np = subsampled_frames.numpy().transpose(1, 2, 3, 0)
29
+
30
+ # Preprocess the video frames.
31
+ inputs = feature_extractor(list(video_data_np), return_tensors="pt")
32
+
33
+ # Run inference
34
+ with torch.no_grad():
35
+ outputs = model(**inputs)
36
+ logits = outputs.logits
37
+
38
+ # Model predicts one of the 400 Kinetics 400 classes
39
+ predicted_label = logits.argmax(-1).item()
40
+ print(model.config.id2label[predicted_label])
41
+ # `eating spaghetti` (if you chose this video:
42
+ # https://hf.co/datasets/nielsr/video-demo/resolve/main/eating_spaghetti.mp4)
43
+ ```
44
+
45
+ ## Useful Resources
46
+
47
+ - [Developing a simple video classification model](https://keras.io/examples/vision/video_classification)
48
+ - [Video classification with Transformers](https://keras.io/examples/vision/video_transformers)
49
+ - [Building a video archive](https://www.youtube.com/watch?v=_IeS1m8r6SY)
50
+ - [Video classification task guide](https://huggingface.co/docs/transformers/tasks/video_classification)
51
+
52
+ ### Creating your own video classifier in minutes
53
+ - [Fine-tuning tutorial notebook (PyTorch)](https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/video_classification.ipynb)
@@ -0,0 +1,84 @@
1
+ import type { TaskDataCustom } from "../Types";
2
+
3
+ const taskData: TaskDataCustom = {
4
+ datasets: [
5
+ {
6
+ // TODO write proper description
7
+ description: "Benchmark dataset used for video classification with videos that belong to 400 classes.",
8
+ id: "kinetics400",
9
+ },
10
+ ],
11
+ demo: {
12
+ inputs: [
13
+ {
14
+ filename: "video-classification-input.gif",
15
+ type: "img",
16
+ },
17
+ ],
18
+ outputs: [
19
+ {
20
+ type: "chart",
21
+ data: [
22
+ {
23
+ label: "Playing Guitar",
24
+ score: 0.514,
25
+ },
26
+ {
27
+ label: "Playing Tennis",
28
+ score: 0.193,
29
+ },
30
+ {
31
+ label: "Cooking",
32
+ score: 0.068,
33
+ },
34
+ ],
35
+ },
36
+ ],
37
+ },
38
+ metrics: [
39
+ {
40
+ description: "",
41
+ id: "accuracy",
42
+ },
43
+ {
44
+ description: "",
45
+ id: "recall",
46
+ },
47
+ {
48
+ description: "",
49
+ id: "precision",
50
+ },
51
+ {
52
+ description: "",
53
+ id: "f1",
54
+ },
55
+
56
+ ],
57
+ models: [
58
+ {
59
+ // TO DO: write description
60
+ description: "Strong Video Classification model trained on the Kinects 400 dataset.",
61
+ id: "MCG-NJU/videomae-base-finetuned-kinetics",
62
+ },
63
+ {
64
+ // TO DO: write description
65
+ description: "Strong Video Classification model trained on the Kinects 400 dataset.",
66
+ id: "microsoft/xclip-base-patch32",
67
+ },
68
+ ],
69
+ spaces: [
70
+ {
71
+ description: "An application that classifies video at different timestamps.",
72
+ id: "nateraw/lavila",
73
+ },
74
+ {
75
+ description: "An application that classifies video.",
76
+ id: "fcakyon/video-classification",
77
+ },
78
+ ],
79
+ summary: "Video classification is the task of assigning a label or class to an entire video. Videos are expected to have only one class for each video. Video classification models take a video as input and return a prediction about which class the video belongs to.",
80
+ widgetModels: [],
81
+ youtubeId: "",
82
+ };
83
+
84
+ export default taskData;
@@ -0,0 +1,43 @@
1
+ ## Use Cases
2
+
3
+ ### Aid the Visually Impaired Persons
4
+ VQA models can be used to reduce visual barriers for visually impaired individuals by allowing them to get information about images from the web and the real world.
5
+
6
+ ### Education
7
+ VQA models can be used to improve experiences at museums by allowing observers to directly ask questions they interested in.
8
+
9
+ ### Improved Image Retrieval
10
+ Visual question answering models can be used to retrieve images with specific characteristics. For example, the user can ask "Is there a dog?" to find all images with dogs from a set of images.
11
+
12
+ ### Video Search
13
+ Specific snippets/timestamps of a video can be retrieved based on search queries. For example, the user can ask "At which part of the video does the guitar appear?" and get a specific timestamp range from the whole video.
14
+
15
+ ## Task Variants
16
+
17
+ ### Video Question Answering
18
+ Video Question Answering aims to answer questions asked about the content of a video.
19
+
20
+ ## Inference
21
+
22
+ You can infer with Visual Question Answering models using the `vqa` (or `visual-question-answering`) pipeline. This pipeline requires [the Python Image Library (PIL)](https://pillow.readthedocs.io/en/stable/) to process images. You can install it with (`pip install pillow`).
23
+
24
+ ```python
25
+ from PIL import Image
26
+ from transformers import pipeline
27
+
28
+ vqa_pipeline = pipeline("visual-question-answering")
29
+
30
+ image = Image.open("elephant.jpeg")
31
+ question = "Is there an elephant?"
32
+
33
+ vqa_pipeline(image, question, top_k=1)
34
+ #[{'score': 0.9998154044151306, 'answer': 'yes'}]
35
+ ```
36
+
37
+ ## Useful Resources
38
+
39
+ - [An introduction to Visual Question Answering - AllenAI](https://blog.allenai.org/vanilla-vqa-adcaaaa94336)
40
+ - [Multi Modal Framework (MMF) - Meta Research](https://mmf.sh/docs/getting_started/video_overview/)
41
+
42
+ The contents of this page are contributed by [
43
+ Bharat Raghunathan](https://huggingface.co/bharat-raghunathan) and [Jose Londono Botero](https://huggingface.co/jlondonobo).
@@ -0,0 +1,90 @@
1
+ import type { TaskDataCustom } from "../Types";
2
+
3
+ const taskData: TaskDataCustom = {
4
+ datasets: [
5
+ {
6
+ description: "A widely used dataset containing questions (with answers) about images.",
7
+ id: "Graphcore/vqa",
8
+ },
9
+ {
10
+ description: "A dataset to benchmark visual reasoning based on text in images.",
11
+ id: "textvqa",
12
+ }
13
+ ],
14
+ demo: {
15
+ inputs: [
16
+ {
17
+ filename: "elephant.jpeg",
18
+ type: "img",
19
+ },
20
+ {
21
+ label: "Question",
22
+ content: "What is in this image?",
23
+ type: "text",
24
+ },
25
+ ],
26
+ outputs: [
27
+ {
28
+ type: "chart",
29
+ data: [
30
+ {
31
+ label: "elephant",
32
+ score: 0.97,
33
+ },
34
+ {
35
+ label: "elephants",
36
+ score: 0.06,
37
+ },
38
+ {
39
+ label: "animal",
40
+ score: 0.003,
41
+ },
42
+ ],
43
+ },
44
+ ],
45
+ },
46
+ isPlaceholder: false,
47
+ metrics: [
48
+ {
49
+ description: "",
50
+ id: "accuracy",
51
+ },
52
+ {
53
+ description: "Measures how much a predicted answer differs from the ground truth based on the difference in their semantic meaning.",
54
+ id: "wu-palmer similarity",
55
+ },
56
+ ],
57
+ models: [
58
+ {
59
+ description: "A visual question answering model trained to convert charts and plots to text.",
60
+ id: "google/deplot",
61
+ },
62
+ {
63
+ description: "A visual question answering model trained for mathematical reasoning and chart derendering from images.",
64
+ id: "google/matcha-base ",
65
+ },
66
+ {
67
+ description: "A strong visual question answering that answers questions from book covers.",
68
+ id: "google/pix2struct-ocrvqa-large",
69
+ },
70
+ ],
71
+ spaces: [
72
+ {
73
+ description: "An application that can answer questions based on images.",
74
+ id: "nielsr/vilt-vqa",
75
+ },
76
+ {
77
+ description: "An application that can caption images and answer questions about a given image. ",
78
+ id: "Salesforce/BLIP",
79
+ },
80
+ {
81
+ description: "An application that can caption images and answer questions about a given image. ",
82
+ id: "vumichien/Img2Prompt",
83
+ },
84
+ ],
85
+ summary: "Visual Question Answering is the task of answering open-ended questions based on an image. They output natural language responses to natural language questions.",
86
+ widgetModels: ["dandelin/vilt-b32-finetuned-vqa"],
87
+ youtubeId: "",
88
+ };
89
+
90
+ export default taskData;
@@ -0,0 +1,39 @@
1
+ ## About the Task
2
+
3
+ Zero Shot Classification is the task of predicting a class that wasn't seen by the model during training. This method, which leverages a pre-trained language model, can be thought of as an instance of [transfer learning](https://www.youtube.com/watch?v=BqqfQnyjmgg) which generally refers to using a model trained for one task in a different application than what it was originally trained for. This is particularly useful for situations where the amount of labeled data is small.
4
+
5
+ In zero shot classification, we provide the model with a prompt and a sequence of text that describes what we want our model to do, in natural language. Zero-shot classification excludes any examples of the desired task being completed. This differs from single or few-shot classification, as these tasks include a single or a few examples of the selected task.
6
+
7
+ Zero, single and few-shot classification seem to be an emergent feature of large language models. This feature seems to come about around model sizes of +100M parameters. The effectiveness of a model at a zero, single or few-shot task seems to scale with model size, meaning that larger models (models with more trainable parameters or layers) generally do better at this task.
8
+
9
+
10
+ Here is an example of a zero-shot prompt for classifying the sentiment of a sequence of text:
11
+ ```
12
+ Classify the following input text into one of the following three categories: [positive, negative, neutral]
13
+
14
+ Input Text: Hugging Face is awesome for making all of these
15
+ state of the art models available!
16
+ Sentiment: positive
17
+
18
+ ```
19
+
20
+ One great example of this task with a nice off-the-shelf model is available at the widget of this page, where the user can input a sequence of text and candidate labels to the model. This is a *word level* example of zero shot classification, more elaborate and lengthy generations are available with larger models. Testing these models out and getting a feel for prompt engineering is the best way to learn how to use them.
21
+
22
+ ## Inference
23
+ You can use the 🤗 Transformers library zero-shot-classification pipeline to infer with zero shot text classification models.
24
+
25
+ ```python
26
+ from transformers import pipeline
27
+
28
+ pipe = pipeline(model="facebook/bart-large-mnli")
29
+ pipe("I have a problem with my iphone that needs to be resolved asap!",
30
+ candidate_labels=["urgent", "not urgent", "phone", "tablet", "computer"],
31
+ )
32
+ # output
33
+ >>> {'sequence': 'I have a problem with my iphone that needs to be resolved asap!!', 'labels': ['urgent', 'phone', 'computer', 'not urgent', 'tablet'], 'scores': [0.504, 0.479, 0.013, 0.003, 0.002]}
34
+ ```
35
+
36
+ ## Useful Resources
37
+ - [Zero Shot Learning](https://joeddav.github.io/blog/2020/05/29/ZSL.html)
38
+ - [Hugging Face on Transfer Learning](https://huggingface.co/course/en/chapter1/4?fw=pt#transfer-learning)
39
+
@@ -0,0 +1,66 @@
1
+ import type { TaskDataCustom } from "../Types";
2
+
3
+ const taskData: TaskDataCustom = {
4
+
5
+ datasets: [
6
+ {
7
+ description: "A widely used dataset used to benchmark multiple variants of text classification.",
8
+ id: "glue",
9
+ },
10
+ {
11
+ description: "The Multi-Genre Natural Language Inference (MultiNLI) corpus is a crowd-sourced collection of 433k sentence pairs annotated with textual entailment information.",
12
+ id: "MultiNLI",
13
+ },
14
+ {
15
+ description: "FEVER is a publicly available dataset for fact extraction and verification against textual sources.",
16
+ id: "FEVER",
17
+ },
18
+ ],
19
+ demo: {
20
+ inputs: [
21
+ {
22
+ label: "Text Input",
23
+ content: "Dune is the best movie ever.",
24
+ type: "text",
25
+ },
26
+ {
27
+ label: "Candidate Labels",
28
+ content: "CINEMA, ART, MUSIC",
29
+ type: "text",
30
+ },
31
+
32
+ ],
33
+ outputs: [
34
+ {
35
+ type: "chart",
36
+ data: [
37
+ {
38
+ label: "CINEMA",
39
+ score: 0.90,
40
+ },
41
+ {
42
+ label: "ART",
43
+ score: 0.10,
44
+ },
45
+ {
46
+ label: "MUSIC",
47
+ score: 0.00,
48
+ },
49
+ ],
50
+ },
51
+ ],
52
+ },
53
+ metrics: [],
54
+ models: [
55
+ {
56
+ description:
57
+ "Powerful zero-shot text classification model",
58
+ id: "facebook/bart-large-mnli",
59
+ },
60
+ ],
61
+ spaces: [],
62
+ summary: "Zero-shot text classification is a task in natural language processing where a model is trained on a set of labeled examples but is then able to classify new examples from previously unseen classes.",
63
+ widgetModels: ["facebook/bart-large-mnli"],
64
+ };
65
+
66
+ export default taskData;
@@ -0,0 +1,68 @@
1
+ ## About the Task
2
+
3
+ Zero-shot image classification is a computer vision task to classify images into one of several classes, without any prior training or knowledge of the classes.
4
+
5
+ Zero shot image classification works by transferring knowledge learnt during training of one model, to classify novel classes that was not present in the training data. So this is a variation of [transfer learning](https://www.youtube.com/watch?v=BqqfQnyjmgg). For instance, a model trained to differentiate cars from airplanes can be used to classify images of ships.
6
+
7
+ The data in this learning paradigm consists of
8
+
9
+ - Seen data - images and their corresponding labels
10
+ - Unseen data - only labels and no images
11
+ - Auxiliary information - additional information given to the model during training connecting the unseen and seen data. This can be in the form of textual description or word embeddings.
12
+
13
+
14
+ ## Use Cases
15
+
16
+ ### Image Retrieval
17
+ Zero-shot learning resolves several challenges in image retrieval systems. For example, with the rapid growth of categories on the web, it is challenging to index images based on unseen categories. With zero-shot learning we can associate unseen categories to images by exploiting attributes to model the relationships among visual features and labels.
18
+
19
+ ### Action Recognition
20
+ Action recognition is the task of identifying when a person in an image/video is performing a given action from a set of actions. If all the possible actions are not known beforehand, conventional deep learning models fail. With zero-shot learning, for a given domain of a set of actions, we can create a mapping connecting low-level features and a semantic description of auxiliary data to classify unknown classes of actions.
21
+
22
+
23
+ ## Task Variants
24
+
25
+ You can contribute variants of this task [here](https://github.com/huggingface/hub-docs/blob/main/tasks/src/zero-shot-image-classification/about.md).
26
+
27
+ ## Inference
28
+
29
+ The model can be loaded with the zero-shot-image-classification pipeline like so:
30
+ ```python
31
+ from transformers import pipeline
32
+ # More models in the model hub.
33
+ model_name = "openai/clip-vit-large-patch14-336"
34
+ classifier = pipeline("zero-shot-image-classification", model = model_name)
35
+ ```
36
+ You can then use this pipeline to classify images into any of the class names you specify. You can specify more than two class labels too.
37
+ ```python
38
+ image_to_classify = "path_to_cat_and_dog_image.jpeg"
39
+ labels_for_classification = ["cat and dog",
40
+ "lion and cheetah",
41
+ "rabbit and lion"]
42
+ scores = classifier(image_to_classify,
43
+ candidate_labels = labels_for_classification)
44
+ ```
45
+ The classifier would return a list of dictionaries after the inference which is stored in the variable `scores` in the code snippet above. Variable `scores` would look as follows:
46
+ ```python
47
+ [{'score': 0.9950482249259949, 'label': 'cat and dog'},
48
+ {'score': 0.004863627254962921, 'label': 'rabbit and lion'},
49
+ {'score': 8.816882473183796e-05, 'label': 'lion and cheetah'}]
50
+ ```
51
+ The dictionary at the zeroth index of the list will contain the label with the highest score.
52
+ ```python
53
+ print(f"The highest score is {scores[0]['score']:.3f} for the label {scores[0]['label']}")
54
+ ```
55
+ The output from the print statement above would look as follows:
56
+ ```
57
+ The highest probability is 0.995 for the label cat and dog
58
+ ```
59
+
60
+ ## Useful Resources
61
+
62
+ You can contribute useful resources about this task [here](https://github.com/huggingface/hub-docs/blob/main/tasks/src/zero-shot-image-classification/about.md).
63
+
64
+ Check out [Zero-shot image classification task guide](https://huggingface.co/docs/transformers/tasks/zero_shot_image_classification).
65
+
66
+ This page was made possible thanks to the efforts of [Shamima Hossain](https://huggingface.co/Shamima), [Haider Zaidi
67
+ ](https://huggingface.co/chefhaider) and [Paarth Bhatnagar](https://huggingface.co/Paarth).
68
+
@@ -0,0 +1,79 @@
1
+ import type { TaskDataCustom } from "../Types";
2
+
3
+ const taskData: TaskDataCustom = {
4
+ datasets: [
5
+ {
6
+ // TODO write proper description
7
+ description: "",
8
+ id: "",
9
+ },
10
+ ],
11
+ demo: {
12
+ inputs: [
13
+ {
14
+ filename: "image-classification-input.jpeg",
15
+ type: "img",
16
+ },
17
+ {
18
+ label: "Classes",
19
+ content: "cat, dog, bird",
20
+ type: "text",
21
+ },
22
+ ],
23
+ outputs: [
24
+ {
25
+ type: "chart",
26
+ data: [
27
+ {
28
+ label: "Cat",
29
+ score: 0.664,
30
+ },
31
+ {
32
+ label: "Dog",
33
+ score: 0.329,
34
+ },
35
+ {
36
+ label: "Bird",
37
+ score: 0.008,
38
+ },
39
+ ],
40
+ },
41
+ ],
42
+ },
43
+ metrics: [
44
+ {
45
+ description:
46
+ "Computes the number of times the correct label appears in top K labels predicted",
47
+ id: "top-K accuracy",
48
+ },
49
+ ],
50
+ models: [
51
+ {
52
+ description:
53
+ "Robust image classification model trained on publicly available image-caption data.",
54
+ id: "openai/clip-vit-base-patch16",
55
+ },
56
+ {
57
+ description:
58
+ "Robust image classification model trained on publicly available image-caption data trained on additional high pixel data for better performance.",
59
+ id: "openai/clip-vit-large-patch14-336",
60
+ },
61
+ {
62
+ description:
63
+ "Strong image classification model for biomedical domain.",
64
+ id: "microsoft/BiomedCLIP-PubMedBERT_256-vit_base_patch16_224",
65
+ },
66
+ ],
67
+ spaces: [
68
+ {
69
+ description: "An application that leverages zero shot image classification to find best captions to generate an image. ",
70
+ id: "pharma/CLIP-Interrogator",
71
+ },
72
+ ],
73
+ summary:
74
+ "Zero shot image classification is the task of classifying previously unseen classes during training of a model.",
75
+ widgetModels: ["openai/clip-vit-large-patch14-336"],
76
+ youtubeId: "",
77
+ };
78
+
79
+ export default taskData;