[go: nahoru, domu]

Skip to content

Commit

Permalink
Merge pull request #663 from roboflow/develop
Browse files Browse the repository at this point in the history
`supervision-0.17.1` release
  • Loading branch information
SkalskiP committed Dec 8, 2023
2 parents 36ab9dc + ee697ca commit bcb26f9
Show file tree
Hide file tree
Showing 14 changed files with 659 additions and 617 deletions.
17 changes: 0 additions & 17 deletions .github/requirements-dev.txt

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: 3.x
- run: pip install mkdocs-material
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
uses: actions/checkout@v4

- name: 🐍 Set up Python 3.8 environment for build
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: "3.8"

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
with:
ref: ${{ github.head_ref }}
- name: 🐍 Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-min.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: 🛎️ Checkout
uses: actions/checkout@v4
- name: 🐍 Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
# id based on python version
id: python-setup
with:
Expand Down
11 changes: 4 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,21 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10","3.11"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- name: 🛎️ Checkout
uses: actions/checkout@v4
- name: 🐍 Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
# id based on python version
id: python-setup
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
check-latest: true
cache: 'pip'
cache-dependency-path: '**/requirements-dev.txt'

- name: 📦 Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r .github/requirements-dev.txt
pip install .
pip install pytest
- name: 🧪 Test
run: "python -m pytest ./test"
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
## 💻 install

Pip install the supervision package in a
[**3.11>=Python>=3.8**](https://www.python.org/) environment.
[**Python>=3.8**](https://www.python.org/) environment.

```bash
pip install supervision
Expand Down
19 changes: 14 additions & 5 deletions demo.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@
"output_type": "stream",
"text": [
"\u001b[?25l \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m0.0/45.4 kB\u001b[0m \u001b[31m?\u001b[0m eta \u001b[36m-:--:--\u001b[0m\r\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m45.4/45.4 kB\u001b[0m \u001b[31m3.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
"\u001b[?25h0.16.0\n"
"\u001b[?25h0.17.0\n"
]
}
],
Expand Down Expand Up @@ -803,6 +803,15 @@
"**NOTE:** During our demo, we will need some example videos."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"!pip install -q supervision[assets]"
]
},
{
"cell_type": "code",
"execution_count": 63,
Expand Down Expand Up @@ -831,9 +840,7 @@
},
"outputs": [],
"source": [
"%cd {HOME}/videos\n",
"\n",
"!wget --load-cookies /tmp/cookies.txt \"https://docs.google.com/uc?export=download&confirm=$(wget --quiet --save-cookies /tmp/cookies.txt --keep-session-cookies --no-check-certificate 'https://docs.google.com/uc?export=download&id=1pz68D1Gsx80MoPg-_q-IbEdESEmyVLm-' -O- | sed -rn 's/.*confirm=([0-9A-Za-z_]+).*/\\1\\n/p')&id=1pz68D1Gsx80MoPg-_q-IbEdESEmyVLm-\" -O vehicle-counting.mp4 && rm -rf /tmp/cookies.txt"
"%cd {HOME}/videos"
]
},
{
Expand All @@ -844,7 +851,9 @@
},
"outputs": [],
"source": [
"VIDEO_PATH = f\"{HOME}/videos/vehicle-counting.mp4\""
"from supervision.assets import download_assets, VideoAssets\n",
"download_assets(VideoAssets.VEHICLES)\n",
"VIDEO_PATH = f\"{HOME}/videos/vehicle.mp4\""
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ We write your reusable computer vision tools. Whether you need to load your data
## 💻 Install

You can install `supervision` with pip in a
[**3.11>=Python>=3.8**](https://www.python.org/) environment.
[**Python>=3.8**](https://www.python.org/) environment.

!!! example "pip install (recommended)"

Expand Down
10 changes: 10 additions & 0 deletions examples/tracking/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,16 @@ detection and Supervision for tracking and annotation.
pip install -r requirements.txt
```

## ⚙️ run

```bash
python script.py \
--source_weights_path yolov8s.pt \
--source_video_path input.mp4 \
--target_video_path tracking_result.mp4
```


## ⚙️ parameters

| parameter | required | description |
Expand Down
2 changes: 1 addition & 1 deletion examples/tracking/script.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def process_video(

tracker = sv.ByteTrack()
box_annotator = sv.BoundingBoxAnnotator()
label_annotator = sv.LabelAnnotator(classes=model.names)
label_annotator = sv.LabelAnnotator()
frame_generator = sv.get_video_frames_generator(source_path=source_video_path)
video_info = sv.VideoInfo.from_video_path(video_path=source_video_path)

Expand Down
2 changes: 1 addition & 1 deletion examples/traffic_analysis/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
supervision>=0.15.0rc1
supervision
tqdm
ultralytics
gdown
Loading

0 comments on commit bcb26f9

Please sign in to comment.