Skip to content

Commit

Permalink
Merge branch 'main' into fix/use_base64_payloads_for_remote_invocations
Browse files Browse the repository at this point in the history
  • Loading branch information
PawelPeczek-Roboflow authored Nov 14, 2024
2 parents 54e5d70 + 4b6c7b6 commit 25fbbc5
Show file tree
Hide file tree
Showing 279 changed files with 12,227 additions and 2,073 deletions.
2 changes: 1 addition & 1 deletion development/stream_interface/workflows_demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from inference.core.utils.drawing import create_tiles

STOP = False
ANNOTATOR = sv.BoundingBoxAnnotator()
ANNOTATOR = sv.BoxAnnotator()
fps_monitor = sv.FPSMonitor()


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@
}

STOP = False
ANNOTATOR = sv.BoundingBoxAnnotator()
ANNOTATOR = sv.BoxAnnotator()
fps_monitor = sv.FPSMonitor()


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@
}

STOP = False
ANNOTATOR = sv.BoundingBoxAnnotator()
ANNOTATOR = sv.BoxAnnotator()
fps_monitor = sv.FPSMonitor()


Expand Down
4 changes: 2 additions & 2 deletions docker/dockerfiles/Dockerfile.onnx.cpu
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ RUN pip3 install --upgrade pip && pip3 install \
-r requirements.yolo_world.txt \
-r requirements.transformers.txt \
jupyterlab \
wheel>=0.38.0 \
"setuptools<=75.5.0" \
--upgrade \
&& rm -rf ~/.cache/pip

Expand All @@ -51,7 +51,7 @@ COPY --from=base / /
WORKDIR /build
COPY . .
RUN make create_wheels
RUN pip3 install dist/inference_cli*.whl dist/inference_core*.whl dist/inference_cpu*.whl dist/inference_sdk*.whl
RUN pip3 install dist/inference_cli*.whl dist/inference_core*.whl dist/inference_cpu*.whl dist/inference_sdk*.whl "setuptools<=75.5.0"

RUN if [ "${TARGETPLATFORM}" = "linux/amd64" ]; then pip3 install -r requirements/requirements.vino.txt; rm -rf ~/.cache/pip; fi

Expand Down
4 changes: 2 additions & 2 deletions docker/dockerfiles/Dockerfile.onnx.cpu.dev
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ RUN pip3 install --upgrade pip && pip3 install \
-r requirements.yolo_world.txt \
-r requirements.transformers.txt \
jupyterlab \
wheel>=0.38.0 \
"setuptools<=75.5.0" \
--upgrade \
&& rm -rf ~/.cache/pip

Expand All @@ -51,7 +51,7 @@ COPY --from=base / /
WORKDIR /build
COPY . .
RUN make create_wheels
RUN pip3 install dist/inference_cli*.whl dist/inference_core*.whl dist/inference_cpu*.whl dist/inference_sdk*.whl
RUN pip3 install dist/inference_cli*.whl dist/inference_core*.whl dist/inference_cpu*.whl dist/inference_sdk*.whl "setuptools<=75.5.0"
RUN pip3 install watchdog[watchmedo]
RUN if [ "${TARGETPLATFORM}" = "linux/amd64" ]; then pip3 install -r requirements/requirements.vino.txt; rm -rf ~/.cache/pip; fi

Expand Down
2 changes: 1 addition & 1 deletion docker/dockerfiles/Dockerfile.onnx.cpu.parallel
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ RUN pip3 install --upgrade pip && pip3 install \
-r requirements.parallel.txt \
-r requirements.cli.txt \
-r requirements.sdk.http.txt \
wheel>=0.38.0 \
"setuptools<=75.5.0" \
--upgrade \
&& rm -rf ~/.cache/pip
RUN apt-get update && apt-get install -y lsb-release curl gpg
Expand Down
2 changes: 1 addition & 1 deletion docker/dockerfiles/Dockerfile.onnx.cpu.slim
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ RUN pip3 install --upgrade pip && pip3 install \
-r requirements.waf.txt \
-r requirements.cli.txt \
-r requirements.sdk.http.txt \
wheel>=0.38.0 \
"setuptools<=75.5.0" \
--upgrade \
&& rm -rf ~/.cache/pip

Expand Down
1 change: 1 addition & 0 deletions docker/dockerfiles/Dockerfile.onnx.cpu.stream_manager
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ RUN pip3 install --upgrade pip && pip3 install \
-r _requirements.txt \
-r requirements.cpu.txt \
-r requirements.http.txt \
"setuptools<=75.5.0" \
--upgrade \
&& rm -rf ~/.cache/pip

Expand Down
3 changes: 2 additions & 1 deletion docker/dockerfiles/Dockerfile.onnx.gpu
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ RUN python3 -m pip install \
-r requirements.yolo_world.txt \
-r requirements.transformers.txt \
jupyterlab \
"setuptools<=75.5.0" \
--upgrade \
&& rm -rf ~/.cache/pip

Expand All @@ -60,7 +61,7 @@ WORKDIR /build
COPY . .
RUN ln -s /usr/bin/python3 /usr/bin/python
RUN /bin/make create_wheels_for_gpu_notebook
RUN pip3 install --no-cache-dir dist/inference_cli*.whl dist/inference_core*.whl dist/inference_gpu*.whl dist/inference_sdk*.whl
RUN pip3 install --no-cache-dir dist/inference_cli*.whl dist/inference_core*.whl dist/inference_gpu*.whl dist/inference_sdk*.whl "setuptools<=75.5.0"

WORKDIR /notebooks
COPY examples/notebooks .
Expand Down
1 change: 1 addition & 0 deletions docker/dockerfiles/Dockerfile.onnx.gpu.dev
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ RUN python3 -m pip install \
-r requirements.sdk.http.txt \
-r requirements.cli.txt \
jupyterlab \
"setuptools<=75.5.0" \
--upgrade \
&& rm -rf ~/.cache/pip

Expand Down
3 changes: 2 additions & 1 deletion docker/dockerfiles/Dockerfile.onnx.gpu.parallel
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ RUN pip3 install --upgrade pip && pip3 install \
-r requirements.waf.txt \
-r requirements.gaze.txt \
-r requirements.parallel.txt \
"setuptools<=75.5.0" \
--upgrade \
&& rm -rf ~/.cache/pip

Expand All @@ -47,7 +48,7 @@ WORKDIR /build
COPY . .
RUN ln -s /usr/bin/python3 /usr/bin/python
RUN /bin/make create_wheels_for_gpu_notebook
RUN pip3 install dist/inference_cli*.whl dist/inference_core*.whl dist/inference_gpu*.whl dist/inference_sdk*.whl
RUN pip3 install dist/inference_cli*.whl dist/inference_core*.whl dist/inference_gpu*.whl dist/inference_sdk*.whl "setuptools<=75.5.0"

WORKDIR /notebooks
COPY examples/notebooks .
Expand Down
2 changes: 1 addition & 1 deletion docker/dockerfiles/Dockerfile.onnx.gpu.slim
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ RUN pip3 install --upgrade pip && pip3 install \
-r requirements.waf.txt \
-r requirements.cli.txt \
-r requirements.sdk.http.txt \
wheel>=0.38.0 \
"setuptools<=75.5.0" \
--upgrade \
&& rm -rf ~/.cache/pip

Expand Down
1 change: 1 addition & 0 deletions docker/dockerfiles/Dockerfile.onnx.gpu.stream_manager
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ RUN pip3 install --upgrade pip && pip3 install \
-r _requirements.txt \
-r requirements.http.txt \
-r requirements.gpu.txt \
"setuptools<=75.5.0" \
--upgrade \
&& rm -rf ~/.cache/pip

Expand Down
1 change: 1 addition & 0 deletions docker/dockerfiles/Dockerfile.onnx.jetson.4.5.0
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ RUN python3.8 -m pip install --upgrade pip wheel Cython && python3.8 -m pip inst
-r requirements.sdk.http.txt \
-r requirements.yolo_world.txt \
jupyterlab \
"setuptools<=75.5.0" \
--upgrade \
&& rm -rf ~/.cache/pip

Expand Down
1 change: 1 addition & 0 deletions docker/dockerfiles/Dockerfile.onnx.jetson.4.6.1
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ RUN python3.9 -m pip install --upgrade pip "h5py<=3.10.0" && python3.9 -m pip in
-r requirements.sdk.http.txt \
-r requirements.yolo_world.txt \
jupyterlab \
"setuptools<=75.5.0" \
--upgrade \
&& rm -rf ~/.cache/pip

Expand Down
1 change: 1 addition & 0 deletions docker/dockerfiles/Dockerfile.onnx.jetson.5.1.1
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ RUN python3.9 -m pip install --upgrade pip && python3.9 -m pip install \
-r requirements.sdk.http.txt \
-r requirements.yolo_world.txt \
jupyterlab \
"setuptools<=75.5.0" \
--upgrade \
&& rm -rf ~/.cache/pip

Expand Down
27 changes: 15 additions & 12 deletions docker/dockerfiles/Dockerfile.onnx.jetson.5.1.1.stream_manager
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ ENV LANG en_US.UTF-8
RUN apt-get update -y && apt-get install -y \
lshw \
git \
python3.9 \
python3.9-dev \
python3-pip \
python3-matplotlib \
gfortran \
Expand All @@ -24,30 +26,31 @@ COPY requirements/requirements.clip.txt \
requirements/_requirements.txt \
./

RUN pip3 install --ignore-installed PyYAML && rm -rf ~/.cache/pip
RUN python3.9 -m pip install --ignore-installed PyYAML && rm -rf ~/.cache/pip

# We needed to take statically compiled library for last known stable build and put it into hosting
# That was due to faulty builds started 26.06.2024, probably due to release of new version
# of pybind11, which gets automatically pulled while build of zxing_cpp library making
# cmake to fail
RUN wget https://storage.googleapis.com/roboflow-tests-assets/zxing_cpp_library_compiled_for_inference_v0.12.1_python_3.8.tar.gz \
&& tar -xvzf zxing_cpp_library_compiled_for_inference_v0.12.1_python_3.8.tar.gz \
&& mv zxing_cpp-2.2.0.dist-info /usr/local/lib/python3.8/dist-packages/zxing_cpp-2.2.0.dist-info \
&& mv zxingcpp.cpython-38-aarch64-linux-gnu.so /usr/local/lib/python3.8/dist-packages/ \
&& rm zxing_cpp_library_compiled_for_inference_v0.12.1_python_3.8.tar.gz
RUN wget https://storage.googleapis.com/roboflow-tests-assets/zxing_cpp_library_compiled_for_inference_v0.12.1.tar.gz \
&& tar -xvzf zxing_cpp_library_compiled_for_inference_v0.12.1.tar.gz \
&& mv zxing_cpp-2.2.0.dist-info /usr/local/lib/python3.9/dist-packages/zxing_cpp-2.2.0.dist-info \
&& mv zxingcpp.cpython-39-aarch64-linux-gnu.so /usr/local/lib/python3.9/dist-packages/ \
&& rm zxing_cpp_library_compiled_for_inference_v0.12.1.tar.gz

RUN pip3 install --upgrade pip && pip3 install \
RUN python3.9 -m pip install --upgrade pip && python3.9 -m pip install \
-r _requirements.txt \
-r requirements.clip.txt \
-r requirements.http.txt \
"setuptools<=75.5.0" \
--upgrade \
&& rm -rf ~/.cache/pip

RUN pip3 uninstall --yes onnxruntime
RUN wget https://nvidia.box.com/shared/static/iizg3ggrtdkqawkmebbfixo7sce6j365.whl -O onnxruntime_gpu-1.16.0-cp38-cp38-linux_aarch64.whl
RUN pip3 install onnxruntime_gpu-1.16.0-cp38-cp38-linux_aarch64.whl "opencv-python-headless<4.3" \
RUN python3.9 -m pip uninstall --yes onnxruntime
RUN wget https://nvidia.box.com/shared/static/67zek28z497hs9aev7xg2c1wngdeyv4h.whl -O onnxruntime_gpu-1.16.0-cp39-cp39-linux_aarch64.whl
RUN python3.9 -m pip install onnxruntime_gpu-1.16.0-cp39-cp39-linux_aarch64.whl "opencv-python-headless>4" \
&& rm -rf ~/.cache/pip \
&& rm onnxruntime_gpu-1.16.0-cp38-cp38-linux_aarch64.whl
&& rm onnxruntime_gpu-1.16.0-cp39-cp39-linux_aarch64.whl

WORKDIR /app/
COPY inference inference
Expand All @@ -65,4 +68,4 @@ ENV WORKFLOWS_STEP_EXECUTION_MODE=local
ENV WORKFLOWS_MAX_CONCURRENT_STEPS=1
ENV SUPERVISON_DEPRECATION_WARNING=0

ENTRYPOINT ["python3", "-m", "inference.enterprise.stream_management.manager.app"]
ENTRYPOINT ["python3.9", "-m", "inference.enterprise.stream_management.manager.app"]
5 changes: 3 additions & 2 deletions docker/dockerfiles/Dockerfile.onnx.jetson.6.0.0
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ RUN python3 -m pip install --upgrade pip && \
-r requirements/requirements.groundingdino.txt \
-r requirements/requirements.sdk.http.txt \
-r requirements/requirements.yolo_world.txt \
-r requirements/requirements.jetson.txt
-r requirements/requirements.jetson.txt \
"setuptools<=75.5.0"

# Build the application
WORKDIR /build
Expand All @@ -45,7 +46,7 @@ RUN rm -f dist/* && \
python3 .release/pypi/inference.gpu.setup.py bdist_wheel && \
python3 .release/pypi/inference.sdk.setup.py bdist_wheel && \
python3 .release/pypi/inference.cli.setup.py bdist_wheel && \
python3 -m pip install dist/inference_cli*.whl dist/inference_core*.whl dist/inference_gpu*.whl dist/inference_sdk*.whl
python3 -m pip install dist/inference_cli*.whl dist/inference_core*.whl dist/inference_gpu*.whl dist/inference_sdk*.whl "setuptools<=75.5.0"

# Set up the application runtime
WORKDIR /app
Expand Down
1 change: 1 addition & 0 deletions docker/dockerfiles/Dockerfile.onnx.lambda
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ RUN pip3 install \
-r requirements.sdk.http.txt \
-r requirements.yolo_world.txt \
mangum \
"setuptools<=75.5.0" \
--upgrade \
--target "${LAMBDA_TASK_ROOT}" \
&& rm -rf ~/.cache/pip
Expand Down
1 change: 1 addition & 0 deletions docker/dockerfiles/Dockerfile.onnx.lambda.slim
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ RUN pip3 install \
-r requirements.hosted.txt \
-r requirements.sdk.http.txt \
mangum \
"setuptools<=75.5.0" \
--upgrade \
--target "${LAMBDA_TASK_ROOT}" \
&& rm -rf ~/.cache/pip
Expand Down
1 change: 1 addition & 0 deletions docker/dockerfiles/Dockerfile.onnx.trt
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ RUN pip install --upgrade pip && pip install \
-r requirements.doctr.txt \
-r requirements.groundingdino.txt \
-r requirements.sdk.http.txt \
"setuptools<=75.5.0" \
--upgrade \
&& rm -rf ~/.cache/pip

Expand Down
1 change: 1 addition & 0 deletions docker/dockerfiles/Dockerfile.onnx.udp.gpu
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ RUN pip3 install --upgrade pip && pip3 install \
-r requirements.clip.txt \
-r requirements.http.txt \
-r requirements.gpu.txt \
"setuptools<=75.5.0" \
--upgrade \
&& rm -rf ~/.cache/pip

Expand Down
1 change: 1 addition & 0 deletions docker/dockerfiles/Dockerfile.stream_management_api
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ RUN pip3 install --upgrade pip && pip3 install \
-r _requirements.txt \
-r requirements.cpu.txt \
-r requirements.http.txt \
"setuptools<=75.5.0" \
--upgrade \
&& rm -rf ~/.cache/pip

Expand Down
2 changes: 1 addition & 1 deletion docs/foundation/paligemma.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ print(response)

detections = from_pali_gemma(response=response, resolution_wh=image.size, class_list=['person', 'car', 'backpack'])

bounding_box_annotator = sv.BoundingBoxAnnotator()
bounding_box_annotator = sv.BoxAnnotator()
label_annotator = sv.LabelAnnotator()

annotatrd_image = bounding_box_annotator.annotate(image, detections)
Expand Down
4 changes: 2 additions & 2 deletions docs/foundation/yolo_world.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ YOLO World is faster than many other zero-shot object detection models like YOLO

detections = sv.Detections.from_inference(results)

bounding_box_annotator = sv.BoundingBoxAnnotator()
bounding_box_annotator = sv.BoxAnnotator()
label_annotator = sv.LabelAnnotator()

labels = [classes[class_id] for class_id in detections.class_id]
Expand Down Expand Up @@ -98,7 +98,7 @@ YOLO World is faster than many other zero-shot object detection models like YOLO

detections = sv.Detections.from_inference(results)

bounding_box_annotator = sv.BoundingBoxAnnotator()
bounding_box_annotator = sv.BoxAnnotator()
label_annotator = sv.LabelAnnotator()

labels = [classes[class_id] for class_id in detections.class_id]
Expand Down
13 changes: 7 additions & 6 deletions docs/inference_helpers/inference_cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -234,8 +234,8 @@ inference infer -i {path_to_your_video_file} -m {your_project}/{version} -o {pat
#### Configuration of visualisation
Option `-c` can be provided with a path to `*.yml` file configuring `supervision` visualisation.
There are few pre-defined configs:
- `bounding_boxes` - with `BoundingBoxAnnotator` and `LabelAnnotator` annotators
- `bounding_boxes_tracing` - with `ByteTracker` and annotators (`BoundingBoxAnnotator`, `LabelAnnotator`)
- `bounding_boxes` - with `BoxAnnotator` and `LabelAnnotator` annotators
- `bounding_boxes_tracing` - with `ByteTracker` and annotators (`BoxAnnotator`, `LabelAnnotator`)
- `masks` - with `MaskAnnotator` and `LabelAnnotator` annotators
- `polygons` - with `PolygonAnnotator` and `LabelAnnotator` annotators

Expand All @@ -255,17 +255,18 @@ annotators:
trace_length: 60
thickness: 2
tracking:
track_thresh: 0.25
track_buffer: 30
match_thresh: 0.8
track_activation_threshold: 0.25
lost_track_buffer: 30
minimum_matching_threshold: 0.8
frame_rate: 30
```
`annotators` field is a list of dictionaries with two keys: `type` and `param`. `type` points to
name of annotator class:
```python
from supervision import *
ANNOTATOR_TYPE2CLASS = {
"bounding_box": BoundingBoxAnnotator,
"bounding_box": BoxAnnotator,
"box": BoxAnnotator,
"mask": MaskAnnotator,
"polygon": PolygonAnnotator,
"color": ColorAnnotator,
Expand Down
1 change: 0 additions & 1 deletion docs/notebooks/inference_pipeline_rtsp.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,6 @@
"zones = [\n",
" sv.PolygonZone(\n",
" polygon=polygon,\n",
" frame_resolution_wh=[1440,2560],\n",
" )\n",
" for polygon\n",
" in polygons\n",
Expand Down
2 changes: 1 addition & 1 deletion docs/quickstart/explore_models.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ results = model.infer(image)[0]
detections = sv.Detections.from_inference(results)

# create supervision annotators
bounding_box_annotator = sv.BoundingBoxAnnotator()
bounding_box_annotator = sv.BoxAnnotator()
label_annotator = sv.LabelAnnotator()

# annotate the image with our inference results
Expand Down
2 changes: 1 addition & 1 deletion docs/quickstart/load_from_universe.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ results = model.infer(image)
detections = sv.Detections.from_inference(results[0].dict(by_alias=True, exclude_none=True))

# create supervision annotators
bounding_box_annotator = sv.BoundingBoxAnnotator()
bounding_box_annotator = sv.BoxAnnotator()
label_annotator = sv.LabelAnnotator()

# annotate the image with our inference results
Expand Down
2 changes: 1 addition & 1 deletion docs/quickstart/run_model_on_rtsp_webcam.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ import supervision as sv

# create a bounding box annotator and label annotator to use in our custom sink
label_annotator = sv.LabelAnnotator()
box_annotator = sv.BoundingBoxAnnotator()
box_annotator = sv.BoxAnnotator()

def my_custom_sink(predictions: dict, video_frame: VideoFrame):
# get the text labels for each prediction
Expand Down
Loading

0 comments on commit 25fbbc5

Please sign in to comment.