HimanshuGoyal2004 commited on
Commit
08283ff
·
verified ·
1 Parent(s): 45390d0

Uploading Trashify box detection model app.py

Browse files
Files changed (2) hide show
  1. README.md +1 -8
  2. app.py +5 -5
README.md CHANGED
@@ -22,14 +22,7 @@ If `trash`, `hand`, `bin` all detected = +1 point.
22
 
23
  All Trashify models are trained on a custom hand-labelled dataset of people picking up trash and placing it in a bin.
24
 
25
- The dataset can be found on Hugging Face as [`HimanshuGoyal2004/trashify_manual_labelled_images`](https://huggingface.co/datasets/HimanshuGoyal2004/trashify_manual_labelled_images).
26
-
27
- ## Demos
28
-
29
- * [V1](https://huggingface.co/spaces/HimanshuGoyal2004/trashify_demo_v1) = Fine-tuned [Conditional DETR](https://huggingface.co/docs/transformers/en/model_doc/conditional_detr) model trained *without* data augmentation.
30
- * [V2](https://huggingface.co/spaces/HimanshuGoyal2004/trashify_demo_v2) = Fine-tuned Conditional DETR model trained *with* data augmentation.
31
- * [V3](https://huggingface.co/spaces/HimanshuGoyal2004/trashify_demo_v3) = Fine-tuned Conditional DETR model trained *with* data augmentation (same as V2) with an NMS (Non Maximum Suppression) post-processing step.
32
- * [V4](https://huggingface.co/spaces/HimanshuGoyal2004/trashify_demo_v4) = Fine-tuned [RT-DETRv2](https://huggingface.co/docs/transformers/main/en/model_doc/rt_detr_v2) model trained *without* data augmentation or NMS post-processing (current best mAP).
33
 
34
  ## Learn more
35
 
 
22
 
23
  All Trashify models are trained on a custom hand-labelled dataset of people picking up trash and placing it in a bin.
24
 
25
+ The dataset can be found on Hugging Face as [`mrdbourke/trashify_manual_labelled_images`](https://huggingface.co/datasets/HimanshuGoyal2004/trashify_manual_labelled_images).
 
 
 
 
 
 
 
26
 
27
  ## Learn more
28
 
app.py CHANGED
@@ -142,11 +142,11 @@ def predict_on_image(image, conf_threshold):
142
  description = """
143
  Help clean up your local area! Upload an image and get +1 if there is all of the following items detected: trash, bin, hand.
144
 
145
- Model is a fine-tuned version of [RT-DETRv2](https://huggingface.co/docs/transformers/main/en/model_doc/rt_detr_v2#transformers.RTDetrV2Config) on the [Trashify dataset](https://huggingface.co/datasets/HimanshuGoyal2004/trashify_manual_labelled_images).
146
 
147
- See the full data loading and training code on [learnhuggingface.com](https://www.learnhuggingface.com/notebooks/hugging_face_object_detection_tutorial).
148
 
149
- This version is v4 because the first three versions were using a different model and did not perform as well, see the [README](https://huggingface.co/spaces/HimanshuGoyal2004/trashify_demo_v4/blob/main/README.md) for more.
150
  """
151
 
152
  # Create the Gradio interface to accept an image and confidence threshold and return an image with drawn prediction boxes
@@ -160,10 +160,10 @@ demo = gr.Interface(
160
  gr.Image(type="pil", label="Image Output"),
161
  gr.Text(label="Text Output")
162
  ],
163
- title="🚮 Trashify Object Detection Demo V4",
164
  description=description,
165
  # Examples come in the form of a list of lists, where each inner list contains elements to prefill the `inputs` parameter with
166
- # See where the examples originate from here: https://huggingface.co/datasets/HimanshuGoyal2004/trashify_examples/
167
  examples=[
168
  ["trashify_examples/trashify_example_1.jpeg", 0.3],
169
  ["trashify_examples/trashify_example_2.jpeg", 0.3],
 
142
  description = """
143
  Help clean up your local area! Upload an image and get +1 if there is all of the following items detected: trash, bin, hand.
144
 
145
+ Model is a fine-tuned version of [RT-DETRv2](https://huggingface.co/docs/transformers/main/en/model_doc/rt_detr_v2#transformers.RTDetrV2Config) on the [Trashify dataset](https://huggingface.co/datasets/mrdbourke/trashify_manual_labelled_images).
146
 
147
+ See the full data loading and training code on this [google colab notebook](https://colab.research.google.com/drive/1BBMETl2eSEhcj0oTvuOq4mg4Doocibth?usp=sharing).
148
 
149
+ See the [README](https://huggingface.co/spaces/HimanshuGoyal2004/trashify_demo_v4/blob/main/README.md) for more.
150
  """
151
 
152
  # Create the Gradio interface to accept an image and confidence threshold and return an image with drawn prediction boxes
 
160
  gr.Image(type="pil", label="Image Output"),
161
  gr.Text(label="Text Output")
162
  ],
163
+ title="🚮 Trashify Object Detection Demo",
164
  description=description,
165
  # Examples come in the form of a list of lists, where each inner list contains elements to prefill the `inputs` parameter with
166
+ # See where the examples originate from here: https://huggingface.co/datasets/mrdbourke/trashify_examples/
167
  examples=[
168
  ["trashify_examples/trashify_example_1.jpeg", 0.3],
169
  ["trashify_examples/trashify_example_2.jpeg", 0.3],