atticus-carter commited on
Commit
afb7dac
·
verified ·
1 Parent(s): adcd6ed

Upload folder using huggingface_hub

Browse files
Files changed (7) hide show
  1. .gitattributes +2 -0
  2. OceanCV_FirstPass.pt +3 -0
  3. README.md +47 -0
  4. app.py +36 -0
  5. confusion_matrix.png +3 -0
  6. requirements.txt +5 -0
  7. results.png +3 -0
.gitattributes CHANGED
@@ -33,3 +33,5 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ confusion_matrix.png filter=lfs diff=lfs merge=lfs -text
37
+ results.png filter=lfs diff=lfs merge=lfs -text
OceanCV_FirstPass.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a47ac989ba0aace9b298a08317846eefc6810544527fdd4b01554a92a9dbf1ee
3
+ size 118404830
README.md ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language: en
3
+ license: mit
4
+ tags:
5
+ - ocean
6
+ - computer-vision
7
+ - yolo
8
+ - detection
9
+ - marine-science
10
+ datasets:
11
+ - OceanCV
12
+ metrics:
13
+ - map
14
+ - precision
15
+ - recall
16
+ emoji: 🦑
17
+ ---
18
+
19
+ # OceanCV_FirstPass
20
+
21
+ Unified marine object detection model.
22
+
23
+ ### Dataset Overview
24
+ - **Total Images**: 8,605
25
+ - **Total Annotations**: 85,557
26
+ - **Classes**: 1 (object)
27
+ - **Input Resolution**: 1024x1024
28
+
29
+ ### Performance Metrics (Epoch 87)
30
+ | Metric | Value |
31
+ | :--- | :--- |
32
+ | **mAP50** | 85.1% |
33
+ | **mAP50-95** | 61.3% |
34
+ | **Precision** | 87.7% |
35
+ | **Recall** | 77.8% |
36
+
37
+ ### Visualizations
38
+ ![Results](results.png)
39
+ ![Confusion Matrix](confusion_matrix.png)
40
+ ![Labels](labels.jpg)
41
+
42
+ ### Usage
43
+ ```python
44
+ from ultralytics import YOLO
45
+ model = YOLO("OceanCV_FirstPass.pt")
46
+ results = model.predict("image.jpg", imgsz=1024)
47
+ ```
app.py ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+ from ultralytics import YOLO
3
+ from PIL import Image
4
+ import numpy as np
5
+ import cv2
6
+
7
+ st.set_page_config(page_title="OceanCV Object Detection", page_icon="🦑")
8
+
9
+ st.title("OceanCV FirstPass Detector")
10
+ st.write("Upload marine imagery to detect underwater objects.")
11
+
12
+ @st.cache_resource
13
+ def load_model():
14
+ return YOLO("OceanCV_FirstPass.pt")
15
+
16
+ model = load_model()
17
+
18
+ uploaded_file = st.file_uploader("Choose an image...", type=["jpg", "jpeg", "png"])
19
+
20
+ conf = st.slider("Confidence Threshold", 0.1, 1.0, 0.5)
21
+ iou = st.slider("IOU Threshold", 0.1, 1.0, 0.45)
22
+
23
+ if uploaded_file is not None:
24
+ image = Image.open(uploaded_file)
25
+ st.image(image, caption="Uploaded Image", use_column_width=True)
26
+
27
+ if st.button("Detect Objects"):
28
+ with st.spinner("Analyzing..."):
29
+ results = model.predict(image, conf=conf, iou=iou, imgsz=1024)
30
+
31
+ res_plotted = results[0].plot()
32
+ res_rgb = cv2.cvtColor(res_plotted, cv2.COLOR_BGR2RGB)
33
+
34
+ st.image(res_rgb, caption="Processed Image", use_column_width=True)
35
+
36
+ st.write(f"Detected {len(results[0].boxes)} objects.")
confusion_matrix.png ADDED

Git LFS Details

  • SHA256: 045bc751b2febaac33917d364a94923bd9163a9981a589698eb2e705a6904cb5
  • Pointer size: 131 Bytes
  • Size of remote file: 108 kB
requirements.txt ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ ultralytics
2
+ streamlit
3
+ pillow
4
+ numpy
5
+ opencv-python-headless
results.png ADDED

Git LFS Details

  • SHA256: bad7fbfa9ae098065cba8bdc48fb633e41c6fdd6254cd25b9f19b1d6585ef7ac
  • Pointer size: 131 Bytes
  • Size of remote file: 287 kB