ultralytics 8.2.24 set ENV OMP_NUM_THREADS=1 (#13158)
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com> Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
This commit is contained in:
parent
15975e4702
commit
8caa1c96d5
5 changed files with 16 additions and 16 deletions
1
.github/workflows/ci.yaml
vendored
1
.github/workflows/ci.yaml
vendored
|
|
@ -147,7 +147,6 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
python -m pip install --upgrade pip wheel
|
python -m pip install --upgrade pip wheel
|
||||||
pip install -e ".[export]" "coverage[toml]" --extra-index-url https://download.pytorch.org/whl/cpu
|
pip install -e ".[export]" "coverage[toml]" --extra-index-url https://download.pytorch.org/whl/cpu
|
||||||
# yolo export format=tflite imgsz=32 || true
|
|
||||||
- name: Check environment
|
- name: Check environment
|
||||||
run: |
|
run: |
|
||||||
yolo checks
|
yolo checks
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,14 @@
|
||||||
# Ultralytics YOLO 🚀, AGPL-3.0 license
|
# Ultralytics YOLO 🚀, AGPL-3.0 license
|
||||||
|
|
||||||
__version__ = "8.2.23"
|
__version__ = "8.2.24"
|
||||||
|
|
||||||
|
import os
|
||||||
|
|
||||||
|
# Set ENV Variables (place before imports)
|
||||||
|
os.environ["OMP_NUM_THREADS"] = "1" # reduce CPU utilization during training
|
||||||
|
|
||||||
from ultralytics.data.explorer.explorer import Explorer
|
from ultralytics.data.explorer.explorer import Explorer
|
||||||
from ultralytics.models import RTDETR, SAM, YOLO, YOLOWorld
|
from ultralytics.models import NAS, RTDETR, SAM, YOLO, FastSAM, YOLOWorld
|
||||||
from ultralytics.models.fastsam import FastSAM
|
|
||||||
from ultralytics.models.nas import NAS
|
|
||||||
from ultralytics.utils import ASSETS, SETTINGS
|
from ultralytics.utils import ASSETS, SETTINGS
|
||||||
from ultralytics.utils.checks import check_yolo as checks
|
from ultralytics.utils.checks import check_yolo as checks
|
||||||
from ultralytics.utils.downloads import download
|
from ultralytics.utils.downloads import download
|
||||||
|
|
|
||||||
|
|
@ -64,7 +64,7 @@ class Explorer:
|
||||||
import lancedb
|
import lancedb
|
||||||
|
|
||||||
self.connection = lancedb.connect(uri)
|
self.connection = lancedb.connect(uri)
|
||||||
self.table_name = Path(data).name.lower() + "_" + model.lower()
|
self.table_name = f"{Path(data).name.lower()}_{model.lower()}"
|
||||||
self.sim_idx_base_name = (
|
self.sim_idx_base_name = (
|
||||||
f"{self.table_name}_sim_idx".lower()
|
f"{self.table_name}_sim_idx".lower()
|
||||||
) # Use this name and append thres and top_k to reuse the table
|
) # Use this name and append thres and top_k to reuse the table
|
||||||
|
|
@ -268,10 +268,7 @@ class Explorer:
|
||||||
similar = exp.get_similar(img='https://ultralytics.com/images/zidane.jpg')
|
similar = exp.get_similar(img='https://ultralytics.com/images/zidane.jpg')
|
||||||
```
|
```
|
||||||
"""
|
"""
|
||||||
assert return_type in {
|
assert return_type in {"pandas", "arrow"}, f"Return type should be `pandas` or `arrow`, but got {return_type}"
|
||||||
"pandas",
|
|
||||||
"arrow",
|
|
||||||
}, f"Return type should be either `pandas` or `arrow`, but got {return_type}"
|
|
||||||
img = self._check_imgs_or_idxs(img, idx)
|
img = self._check_imgs_or_idxs(img, idx)
|
||||||
similar = self.query(img, limit=limit)
|
similar = self.query(img, limit=limit)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -197,12 +197,11 @@ def layout():
|
||||||
imgs = []
|
imgs = []
|
||||||
if st.session_state.get("error"):
|
if st.session_state.get("error"):
|
||||||
st.error(st.session_state["error"])
|
st.error(st.session_state["error"])
|
||||||
|
elif st.session_state.get("imgs"):
|
||||||
|
imgs = st.session_state.get("imgs")
|
||||||
else:
|
else:
|
||||||
if st.session_state.get("imgs"):
|
imgs = exp.table.to_lance().to_table(columns=["im_file"]).to_pydict()["im_file"]
|
||||||
imgs = st.session_state.get("imgs")
|
st.session_state["res"] = exp.table.to_arrow()
|
||||||
else:
|
|
||||||
imgs = exp.table.to_lance().to_table(columns=["im_file"]).to_pydict()["im_file"]
|
|
||||||
st.session_state["res"] = exp.table.to_arrow()
|
|
||||||
total_imgs, selected_imgs = len(imgs), []
|
total_imgs, selected_imgs = len(imgs), []
|
||||||
with col1:
|
with col1:
|
||||||
subcol1, subcol2, subcol3, subcol4, subcol5 = st.columns(5)
|
subcol1, subcol2, subcol3, subcol4, subcol5 = st.columns(5)
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,9 @@
|
||||||
# Ultralytics YOLO 🚀, AGPL-3.0 license
|
# Ultralytics YOLO 🚀, AGPL-3.0 license
|
||||||
|
|
||||||
|
from .fastsam import FastSAM
|
||||||
|
from .nas import NAS
|
||||||
from .rtdetr import RTDETR
|
from .rtdetr import RTDETR
|
||||||
from .sam import SAM
|
from .sam import SAM
|
||||||
from .yolo import YOLO, YOLOWorld
|
from .yolo import YOLO, YOLOWorld
|
||||||
|
|
||||||
__all__ = "YOLO", "RTDETR", "SAM", "YOLOWorld" # allow simpler import
|
__all__ = "YOLO", "RTDETR", "SAM", "FastSAM", "NAS", "YOLOWorld" # allow simpler import
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue