Skip to content

Commit

Permalink
Bump version to v2.3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
CVHub520 committed Feb 24, 2024
1 parent 943a0ea commit e3f48c7
Show file tree
Hide file tree
Showing 16 changed files with 88,360 additions and 88,301 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,12 @@
## 🥳 What's New [⏏️](#📄-table-of-contents)

- Feb. 2024:
- 🤗 Release the latest version [2.3.2](https://github.com/CVHub520/X-AnyLabeling/releases/tag/v2.3.2) 🤗
- ✨✨✨ Support [YOLOv9](https://github.com/WongKinYiu/yolov9) model.
- Support the conversion from a horizontal bounding box to a rotated bounding box.
- Supports label deletion and renaming. For more details, please refer to the [document](./docs/zh_cn/user_guide.md).
- Support for quick tag correction is available; please refer to this [document](./docs/en/user_guide.md) for guidance.
- 🤗 Release the latest version [2.3.1](https://github.com/CVHub520/X-AnyLabeling/releases/tag/v2.3.1) 🤗
- Release the latest version [2.3.1](https://github.com/CVHub520/X-AnyLabeling/releases/tag/v2.3.1).
- Jan. 2024:
- 👏👏👏 Combining CLIP and SAM models for enhanced semantic and spatial understanding. An example can be found [here](./anylabeling/configs/auto_labeling/edge_sam_with_chinese_clip.yaml).
- 🔥🔥🔥 Adding support for the [Depth Anything](https://github.com/LiheYoung/Depth-Anything.git) model in the depth estimation task.
Expand Down
3 changes: 2 additions & 1 deletion README_zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,12 @@
## 🥳 新功能 [⏏️](#📄-目录)

- 2024年2月:
- 🤗 发布[2.3.2](https://github.com/CVHub520/X-AnyLabeling/releases/tag/v2.3.2)最新版本 🤗
- ✨✨✨ 支持[YOLOv9](https://github.com/WongKinYiu/yolov9)模型。
- 支持将水平框一键转换为旋转框。
- 支持批量标签删除及重命名,详情可参考[用户手册](./docs/zh_cn/user_guide.md)
- 支持快速标签纠正功能,详情可参考[用户手册](./docs/zh_cn/user_guide.md)
- 🤗 发布[2.3.1](https://github.com/CVHub520/X-AnyLabeling/releases/tag/v2.3.1)最新版本 🤗
- 发布[2.3.1](https://github.com/CVHub520/X-AnyLabeling/releases/tag/v2.3.1)版本。
- 2024年1月:
- 支持一键截取子图功能。
- 👏👏👏 结合CLIP和SAM模型,实现更强大的语义和空间理解。具体可参考此[示例](./anylabeling/configs/auto_labeling/edge_sam_with_chinese_clip.yaml)
Expand Down
2 changes: 1 addition & 1 deletion anylabeling/app_info.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__appname__ = "X-AnyLabeling"
__appdescription__ = "Advanced Auto Labeling Solution with Added Features"
__version__ = "2.3.1"
__version__ = "2.3.2"
__preferred_device__ = "CPU" # GPU or CPU
175,947 changes: 87,981 additions & 87,966 deletions anylabeling/resources/resources.py

Large diffs are not rendered by default.

336 changes: 173 additions & 163 deletions anylabeling/resources/translations/en_US.ts

Large diffs are not rendered by default.

Binary file modified anylabeling/resources/translations/zh_CN.qm
Binary file not shown.
332 changes: 176 additions & 156 deletions anylabeling/resources/translations/zh_CN.ts

Large diffs are not rendered by default.

8 changes: 7 additions & 1 deletion anylabeling/services/auto_labeling/__base__/yolo.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,18 @@ def __init__(self, model_config, on_message) -> None:
self.engine = self.config.get("engine", "ort")
if self.engine.lower() == "dnn":
from ..engines import DnnBaseModel

self.net = DnnBaseModel(model_abs_path, __preferred_device__)
self.input_width = self.config.get("input_width", 640)
self.input_height = self.config.get("input_height", 640)
else:
self.net = OnnxBaseModel(model_abs_path, __preferred_device__)
_, _, self.input_height, self.input_width = self.net.get_input_shape()
(
_,
_,
self.input_height,
self.input_width,
) = self.net.get_input_shape()
if not isinstance(self.input_width, int):
self.input_width = self.config.get("input_width", -1)
if not isinstance(self.input_height, int):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
import cv2

class DnnBaseModel():

class DnnBaseModel:
def __init__(self, model_path, device_type: str = "cpu") -> None:
self.net = cv2.dnn.readNet(model_path)
if device_type.lower() == "gpu":
self.net.setPreferableBackend(cv2.dnn.DNN_BACKEND_CUDA)
self.net.setPreferableTarget(cv2.dnn.DNN_TARGET_CUDA)

def get_dnn_inference(
self, blob, extract=True, squeeze=False
):
def get_dnn_inference(self, blob, extract=True, squeeze=False):
self.net.setInput(blob)
outs = self.net.forward(self.net.getUnconnectedOutLayersNames())
if extract:
Expand Down
4 changes: 3 additions & 1 deletion anylabeling/views/labeling/label_converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,9 @@ def get_contours_and_labels(mask, mapping_table, epsilon_factor=0.001):
class_name = color_to_label.get(color_value, "Unknown")
label_map = (binaray_img == color_value).astype(np.uint8)

contours, _ = cv2.findContours(label_map, cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_SIMPLE)
contours, _ = cv2.findContours(
label_map, cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_SIMPLE
)
for contour in contours:
epsilon = epsilon_factor * cv2.arcLength(contour, True)
approx = cv2.approxPolyDP(contour, epsilon, True)
Expand Down
4 changes: 3 additions & 1 deletion anylabeling/views/labeling/label_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,9 @@ def load(self, filename):
if self.image_dir:
image_path = osp.join(self.image_dir, data["imagePath"])
else:
image_path = osp.join(osp.dirname(filename), data["imagePath"])
image_path = osp.join(
osp.dirname(filename), data["imagePath"]
)
image_data = self.load_image_file(image_path)
flags = data.get("flags") or {}
image_path = data["imagePath"]
Expand Down
6 changes: 4 additions & 2 deletions anylabeling/views/labeling/label_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -625,7 +625,9 @@ def __init__(
self.tr("&Convert HBB to OBB"),
self.hbb_to_obb,
icon="convert",
tip=self.tr("Perform conversion from horizontal bounding box to oriented bounding box"),
tip=self.tr(
"Perform conversion from horizontal bounding box to oriented bounding box"
),
)

documentation = action(
Expand Down Expand Up @@ -1620,7 +1622,7 @@ def get_label_file_list(self):
label_file_list.append(osp.join(self.output_dir, file_name))
return label_file_list

def hbb_to_obb(self):
def hbb_to_obb(self):
label_file_list = self.get_label_file_list()

total_files = len(label_file_list)
Expand Down
3 changes: 2 additions & 1 deletion anylabeling/views/labeling/widgets/canvas.py
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,8 @@ def mousePressEvent(self, ev):
elif (
self.selected_vertex()
and int(ev.modifiers()) == QtCore.Qt.ShiftModifier
and self.h_hape.shape_type not in ["rectangle", "rotation", "line"]
and self.h_hape.shape_type
not in ["rectangle", "rotation", "line"]
):
# Delete point if: left-click + SHIFT on a point
self.remove_selected_point()
Expand Down
2 changes: 1 addition & 1 deletion assets/demo.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "2.3.1",
"version": "2.3.2",
"flags": {},
"shapes": [
{
Expand Down
2 changes: 1 addition & 1 deletion docs/en/get_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ To ensure access to the latest features and stable performance, it is highly rec

Running in the GUI environment is convenient but may have limitations compared to running from the source code. Consider the pros and cons based on your specific needs and preferences.

Download Link: [Release](https://github.com/CVHub520/X-AnyLabeling/releases/tag/v2.3.1) | [Baidu Disk](https://pan.baidu.com/s/1w1KZoUFeM5gBrHxhfc4eAA?pwd=d74g)
Download Link: [Release](https://github.com/CVHub520/X-AnyLabeling/releases/tag/v2.3.2) | [Baidu Disk](https://pan.baidu.com/s/1YPU32J8sN5hwTewL4ImMzw?pwd=1y69)

Note:
- For MacOS:
Expand Down
2 changes: 1 addition & 1 deletion docs/zh_cn/get_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ python anylabeling/app.py

为了在选择运行方式时能够更好地权衡利弊,建议用户根据具体需求和偏好,灵活选择源码运行或GUI环境运行,以达到最佳的使用体验。

下载链接:[Release](https://github.com/CVHub520/X-AnyLabeling/releases/tag/v2.3.1) | [百度网盘](https://pan.baidu.com/s/1w1KZoUFeM5gBrHxhfc4eAA?pwd=d74g)
下载链接:[Release](https://github.com/CVHub520/X-AnyLabeling/releases/tag/v2.3.2) | [百度网盘](https://pan.baidu.com/s/1YPU32J8sN5hwTewL4ImMzw?pwd=1y69)


### 文件导入
Expand Down

0 comments on commit e3f48c7

Please sign in to comment.