Spaces:
Sleeping
Sleeping
Commit
•
81365b6
1
Parent(s):
d5b0d03
Upload 2 files
Browse files
app.py
CHANGED
@@ -19,10 +19,10 @@ os.system("wget https://github.com/WongKinYiu/yolov7/releases/download/v0.1/yolo
|
|
19 |
os.system("wget https://github.com/WongKinYiu/yolov7/releases/download/v0.1/yolov7-e6.pt")
|
20 |
|
21 |
def detect_Custom(img,model):
|
22 |
-
if model =='
|
23 |
model='best' # Naming Convention for yolov7 See output file of https://www.kaggle.com/code/owaiskhan9654/training-yolov7-on-kaggle-on-custom-dataset/data
|
24 |
parser = argparse.ArgumentParser()
|
25 |
-
parser.add_argument('--weights', nargs='+', type=str, default=
|
26 |
parser.add_argument('--source', type=str, default='Inference/', help='source')
|
27 |
parser.add_argument('--img-size', type=int, default=640, help='inference size (pixels)')
|
28 |
parser.add_argument('--conf-thres', type=float, default=0.25, help='object confidence threshold')
|
@@ -155,21 +155,17 @@ def detect_Custom(img,model):
|
|
155 |
|
156 |
|
157 |
|
158 |
-
Custom_description="<center>Custom Training Performed on
|
159 |
|
160 |
Footer = (
|
161 |
-
"<center>Model Trained by:
|
162 |
|
163 |
-
"<center> Model Trained
|
164 |
-
|
165 |
-
"<center> Kaggle Profile <a href=\"https://www.kaggle.com/owaiskhan9654\">Link</a> <br> </center>"
|
166 |
|
167 |
-
"<center> HuggingFace🤗 Model Deployed Repository <a href=\"https://huggingface.co/
|
168 |
)
|
169 |
|
170 |
-
|
171 |
-
|
172 |
-
Top_Title="<center>Yolov7 🚀 Custom Trained by <a href='https://www.linkedin.com/in/owaiskhan9654/' style='text-decoration: underline' target='_blank'>Owais Ahmad </center></a>🚗Car and 👦Person Detection Class"
|
173 |
|
174 |
css = ".output-image, .input-image, .image-preview {height: 300px !important}"
|
175 |
-
gr.Interface(detect_Custom,[gr.Image(type="pil"),gr.Dropdown(default="
|
|
|
19 |
os.system("wget https://github.com/WongKinYiu/yolov7/releases/download/v0.1/yolov7-e6.pt")
|
20 |
|
21 |
def detect_Custom(img,model):
|
22 |
+
if model =='YOLOv7':
|
23 |
model='best' # Naming Convention for yolov7 See output file of https://www.kaggle.com/code/owaiskhan9654/training-yolov7-on-kaggle-on-custom-dataset/data
|
24 |
parser = argparse.ArgumentParser()
|
25 |
+
parser.add_argument('--weights', nargs='+', type=str, default="best.pt", help='./best.pt')
|
26 |
parser.add_argument('--source', type=str, default='Inference/', help='source')
|
27 |
parser.add_argument('--img-size', type=int, default=640, help='inference size (pixels)')
|
28 |
parser.add_argument('--conf-thres', type=float, default=0.25, help='object confidence threshold')
|
|
|
155 |
|
156 |
|
157 |
|
158 |
+
Custom_description="<center>Custom Training Performed on Google Colab <a href='https://drive.google.com/drive/folders/1Ez0ZFGaeV6yS7wfSHyY5T7SFRICKKdCj?usp=sharing' style='text-decoration: underline' target='_blank'>Link</a> </center><br> <center>Trainable bag-of-freebies sets new state-of-the-art for real-time object detectors </center>"
|
159 |
|
160 |
Footer = (
|
161 |
+
"<center>Model Trained by: Students of Sipna College of Engineering and Technology, Amravati, Maharashtra. </center>"
|
162 |
|
163 |
+
"<center> Model Trained Google Kernel <a href=\"https://drive.google.com/file/d/1WSOTKwThX2CA_G0NOKOsTxsfMVJSeGH5/view?usp=sharing\">Link</a> <br></center>"
|
|
|
|
|
164 |
|
165 |
+
"<center> HuggingFace🤗 Model Deployed Repository <a href=\"https://huggingface.co/spaces/GauriDeshpande/AutoFis_Yolov7\">Link</a> <br></center>"
|
166 |
)
|
167 |
|
168 |
+
Top_Title="<center>Automated Identification of Fish Spieces (AutoFis) using Yolov8 🚀</center>"
|
|
|
|
|
169 |
|
170 |
css = ".output-image, .input-image, .image-preview {height: 300px !important}"
|
171 |
+
gr.Interface(detect_Custom,[gr.Image(type="pil"),gr.Dropdown(default="YOLOv7",choices=["YOLOv7", "YOLOv5", "YOLOv8"])],gr.Image(type="pil"),css=css,title=Top_Title,description=Custom_description,article=Footer,cache_examples=False).launch()
|
best.pt
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:b816625484dd448f5e026f18761910e4f1888551cbbc730b12c676d1d71c4473
|
3 |
+
size 75108303
|