Skip to content
Open
Show file tree
Hide file tree
Changes from 29 commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
aa3dd5c
feat: Add comprehensive optimizations for faster inference (addresses…
bladeszasza Jun 16, 2025
8192c0c
Update README.md
bladeszasza Jun 16, 2025
24f2351
Update README.md
bladeszasza Jun 16, 2025
433d4f5
Update sowlv2/optimizations/parallel_processor.py
bladeszasza Jun 17, 2025
7f6ce18
Update pyproject.toml
bladeszasza Jun 17, 2025
9964803
Update setup.py
bladeszasza Jun 17, 2025
540f06e
fused the optimised pipeline to the original
bladeszasza Jun 18, 2025
395649b
per object and merged video extension
bladeszasza Jun 18, 2025
182f04e
Finalized All Pipelines
bladeszasza Jun 19, 2025
f77723d
v jepa 2 temporar tracking
bladeszasza Jun 19, 2025
43260c9
pylint fixes
bladeszasza Jun 19, 2025
7ec6bb8
pylint fixes and tests
bladeszasza Jun 19, 2025
11ec382
pylint fixes and tests
bladeszasza Jun 19, 2025
9222aa8
final fixes
bladeszasza Jun 19, 2025
33176b1
final fixes
bladeszasza Jun 19, 2025
26a16e8
Potential fix for code scanning alert no. 7: Workflow does not contai…
bladeszasza Jun 19, 2025
af319c2
added permission blocks
bladeszasza Jun 19, 2025
c76ad8a
Update sowlv2/optimizations/vjepa2_optimization.py
bladeszasza Jun 19, 2025
3de5734
added logging
bladeszasza Jun 19, 2025
37b0857
Merge branch 'main' into feature/make-the-sowlv2-more-efficient
bladeszasza Jun 19, 2025
a4ab672
fixed pyre and pisa
bladeszasza Jun 19, 2025
cb215f1
modernized pyre and pysa
bladeszasza Jun 19, 2025
a4e2255
pylint
bladeszasza Jun 19, 2025
d365e23
pysa pyre
bladeszasza Jun 19, 2025
eb3d822
pylint, pysa pyre combined
bladeszasza Jun 19, 2025
ac734f4
pylint
bladeszasza Jun 19, 2025
c07a62d
Fix pylint issues and enhance notebooks - Fixed W0621 redefined-outer…
bladeszasza Jun 19, 2025
d8687ac
Fix Pyre/Pysa workflow and clean up duplicate steps
bladeszasza Jun 20, 2025
67f0a80
pysa pyre alignment to pysa-action, pyre-action
bladeszasza Jun 20, 2025
cfbfa07
use forker pyre pysa
bladeszasza Jun 20, 2025
604efa5
final fixes
bladeszasza Jun 20, 2025
2b4a8a7
pushed prompt to the optimised pipelines
bladeszasza Jun 20, 2025
e68a60a
pylint
bladeszasza Jun 20, 2025
e27e532
set up edgetam
bladeszasza Jul 25, 2025
20c0aee
fixed sam2 import issue
bladeszasza Jul 25, 2025
50b478e
enhanced v jepa 2
bladeszasza Jul 26, 2025
81fe9ec
performance monitorning
bladeszasza Jul 26, 2025
a1536f1
enhance CLI
bladeszasza Jul 26, 2025
2321eac
performance monitoring system enhancements
bladeszasza Jul 26, 2025
2c4e095
final Kiro touches
bladeszasza Jul 27, 2025
1bd4a32
bug fixes aroun d tests
bladeszasza Jul 27, 2025
ce88685
test fixes
bladeszasza Jul 28, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion .claude/settings.local.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,16 @@
"Bash(python -m pytest tests/unit/utils/test_path_config.py::TestIntegrationPatterns::test_video_pattern_consistency tests/unit/test_cli.py::TestCLIArgumentParsing::test_config_file_argument -v)",
"Bash(git commit:*)",
"Bash(git push:*)",
"Bash(sed:*)"
"Bash(sed:*)",
"Bash(python3:*)",
"Bash(python -m pytest tests/integration/test_optimizations.py::TestParallelProcessing::test_parallel_detection_multiple_prompts -v)",
"Bash(python -m pytest tests/integration/test_optimizations.py::TestOptimizedPipeline::test_optimized_image_processing -v)",
"Bash(python -m pytest tests/integration/test_optimizations.py::TestOptimizedPipeline::test_optimized_image_processing -v -s)",
"Bash(python:*)",
"WebFetch(domain:huggingface.co)",
"Bash(rg:*)",
"WebFetch(domain:github.com)",
"WebFetch(domain:github.com)"
],
"deny": []
}
Expand Down
48 changes: 17 additions & 31 deletions .github/workflows/pyre.yml
Original file line number Diff line number Diff line change
@@ -1,46 +1,32 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

# This workflow integrates Pyre with GitHub's
# Code Scanning feature.
#
# Pyre is a performant type checker for Python compliant with
# PEP 484. Pyre can analyze codebases with millions of lines
# of code incrementally – providing instantaneous feedback
# to developers as they write code.
#
# See https://pyre-check.org

name: Pyre
name: Pyre & Pysa Analysis

on:
workflow_dispatch:
push:
branches: [ "main" ]
branches: [main]
pull_request:
branches: [ "main" ]

permissions:
contents: read
branches: [main]

jobs:
pyre:
permissions:
actions: read
contents: read
security-events: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Run Pyre Action
uses: facebook/pyre-action@v0.0.2
with:
submodules: true
repo-directory: './'
requirements-path: 'requirements.txt'

pysa:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Run Pyre
uses: facebook/pyre-action@60697a7858f7cc8470d8cc494a3cf2ad6b06560d
- name: Run Pysa Action
uses: facebook/pysa-action@v0.0.1
with:
# To customize these inputs:
# See https://github.com/facebook/pyre-action#inputs
repo-directory: './'
requirements-path: 'requirements.txt'
infer-types: true
include-default-sapp-filters: true
Comment thread Fixed
Comment thread Fixed
50 changes: 0 additions & 50 deletions .github/workflows/pysa.yml

This file was deleted.

11 changes: 11 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,15 @@ on:
pull_request:
branches: [ main, develop ]

permissions:
contents: read

jobs:
lint:
runs-on: ubuntu-latest
name: Code Quality (Lint)
permissions:
contents: read

steps:
- name: Checkout code
Expand Down Expand Up @@ -41,6 +46,8 @@ jobs:

test:
runs-on: ubuntu-latest
permissions:
contents: read
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]
Expand Down Expand Up @@ -91,6 +98,8 @@ jobs:

test-cross-platform:
runs-on: ${{ matrix.os }}
permissions:
contents: read
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
Expand Down Expand Up @@ -118,6 +127,8 @@ jobs:
security-scan:
runs-on: ubuntu-latest
name: Security Scan
permissions:
contents: read

steps:
- name: Checkout code
Expand Down
27 changes: 14 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,19 +88,20 @@ Note: If a single prompt contains spaces, it should be enclosed in quotes (e.g.,

### Command-Line Options:

/
| `--prompt` | **(Required)** One or more text queries for object detection (e.g., `"cat"`, or `"dog" "person" "a red car"`). | `None` |
| `--input` | **(Required)** Path to the input: a single image file, a directory of image frames, or a video file. | `None` |
| `--output` | Directory where outputs (masks and overlays) will be saved. Created if it doesn't exist. | `output/` |
| `--owl-model` | (Optional) OWLv2 model name from Hugging Face Model Hub. | `google/owlv2-base-patch16-ensemble` |
| `--sam-model` | (Optional) SAM 2 model name from Hugging Face Model Hub. | `facebook/sam2.1-hiera-small` |
| `--threshold` | (Optional) Detection confidence threshold for OWLv2 (a float between 0 and 1). | `0.1` |
| `--fps` | (Optional) Frame sampling rate (frames per second) for video inputs. | `24` |
| `--device` | (Optional) Compute device (`"cuda"` or `"cpu"`). | Auto-detects GPU, else `cpu` |
| `--no-merged` | (Optional) Disables merged mode. Merged mode (where all masks are combined into a single output [image/video] ) is enabled by default. | Enabled |
| `--no-binary` | (Optional) Disables binary mask generation. Binary mask output is enabled by default. | Enabled |
| `--no-overlay` | (Optional) Disables overlay image generation. Overlay image output (original image with masks) is enabled by default. | Enabled |
| `--config` | (Optional) Path to a YAML configuration file to specify arguments (see [Configuration](#configuration)). Prompts can also be a list in YAML. | `None` |
| Option | Description | Default |
|--------|-------------|---------|
| `--prompt` | **(Required)** One or more text queries for object detection (e.g., `"cat"`, or `"dog" "person" "a red car"`). | `None` |
| `--input` | **(Required)** Path to the input: a single image file, a directory of image frames, or a video file. | `None` |
| `--output` | Directory where outputs (masks and overlays) will be saved. Created if it doesn't exist. | `output/` |
| `--owl-model` | (Optional) OWLv2 model name from Hugging Face Model Hub. | `google/owlv2-base-patch16-ensemble` |
| `--sam-model` | (Optional) SAM 2 model name from Hugging Face Model Hub. | `facebook/sam2.1-hiera-small` |
| `--threshold` | (Optional) Detection confidence threshold for OWLv2 (a float between 0 and 1). | `0.1` |
| `--fps` | (Optional) Frame sampling rate (frames per second) for video inputs. | `24` |
| `--device` | (Optional) Compute device (`"cuda"` or `"cpu"`). | Auto-detects GPU, else `cpu` |
| `--no-merged` | (Optional) Disables merged mode. Merged mode (where all masks are combined into a single output [image/video]) is enabled by default. | Enabled |
| `--no-binary` | (Optional) Disables binary mask generation. Binary mask output is enabled by default. | Enabled |
| `--no-overlay` | (Optional) Disables overlay image generation. Overlay image output (original image with masks) is enabled by default. | Enabled |
| `--config` | (Optional) Path to a YAML configuration file to specify arguments (see Configuration). Prompts can also be a list in YAML. | `None` |

### Examples:

Expand Down
Loading
Loading