Skip to content

Commit 71bba13

Browse files
authored
Merge pull request #78 from vietanhdev/handle_model_downloading_issues
Handle model downloading issues
2 parents 1c54f2b + c679f9c commit 71bba13

13 files changed

Lines changed: 142057 additions & 141858 deletions

File tree

anylabeling/app_info.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
__appname__ = "AnyLabeling"
22
__appdescription__ = "Effortless data labeling with AI support"
3-
__version__ = "0.2.22"
3+
__version__ = "0.2.23"
44
__preferred_device__ = "CPU" # GPU or CPU

anylabeling/resources/resources.py

Lines changed: 141862 additions & 141795 deletions
Large diffs are not rendered by default.

anylabeling/resources/translations/en_US.ts

Lines changed: 35 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -816,12 +816,12 @@ Polygons</source>
816816
<translation type="unfinished"></translation>
817817
</message>
818818
<message>
819-
<location filename="../../services/auto_labeling/model.py" line="91"/>
819+
<location filename="../../services/auto_labeling/model.py" line="106"/>
820820
<source>Downloading model from registry...</source>
821821
<translation type="unfinished"></translation>
822822
</message>
823823
<message>
824-
<location filename="../../services/auto_labeling/model.py" line="146"/>
824+
<location filename="../../services/auto_labeling/model.py" line="161"/>
825825
<source>Downloading {download_url}: {percent}%</source>
826826
<translation type="unfinished"></translation>
827827
</message>
@@ -831,10 +831,30 @@ Polygons</source>
831831
<translation type="unfinished"></translation>
832832
</message>
833833
<message>
834-
<location filename="../../services/auto_labeling/model.py" line="86"/>
834+
<location filename="../../services/auto_labeling/model.py" line="101"/>
835835
<source>Model path not found: {model_path}</source>
836836
<translation type="unfinished"></translation>
837837
</message>
838+
<message>
839+
<location filename="../../services/auto_labeling/yolov8.py" line="44"/>
840+
<source>Could not download or initialize YOLOv8 model.</source>
841+
<translation type="unfinished"></translation>
842+
</message>
843+
<message>
844+
<location filename="../../services/auto_labeling/model.py" line="51"/>
845+
<source>Config file not found: {model_config}</source>
846+
<translation type="unfinished"></translation>
847+
</message>
848+
<message>
849+
<location filename="../../services/auto_labeling/model.py" line="61"/>
850+
<source>Unknown config type: {type}</source>
851+
<translation type="unfinished"></translation>
852+
</message>
853+
<message>
854+
<location filename="../../services/auto_labeling/yolov5.py" line="44"/>
855+
<source>Could not download or initialize YOLOv5 model.</source>
856+
<translation type="unfinished"></translation>
857+
</message>
838858
</context>
839859
<context>
840860
<name>ModelManager</name>
@@ -844,62 +864,62 @@ Polygons</source>
844864
<translation type="unfinished"></translation>
845865
</message>
846866
<message>
847-
<location filename="../../services/auto_labeling/model_manager.py" line="225"/>
867+
<location filename="../../services/auto_labeling/model_manager.py" line="226"/>
848868
<source>No model selected.</source>
849869
<translation type="unfinished"></translation>
850870
</message>
851871
<message>
852-
<location filename="../../services/auto_labeling/model_manager.py" line="241"/>
872+
<location filename="../../services/auto_labeling/model_manager.py" line="242"/>
853873
<source>Loading model: {model_name}. Please wait...</source>
854874
<translation type="unfinished"></translation>
855875
</message>
856876
<message>
857-
<location filename="../../services/auto_labeling/model_manager.py" line="376"/>
877+
<location filename="../../services/auto_labeling/model_manager.py" line="392"/>
858878
<source>Model is not loaded. Choose a mode to continue.</source>
859879
<translation type="unfinished"></translation>
860880
</message>
861881
<message>
862-
<location filename="../../services/auto_labeling/model_manager.py" line="362"/>
882+
<location filename="../../services/auto_labeling/model_manager.py" line="378"/>
863883
<source>Error in model prediction. Please check the model.</source>
864884
<translation type="unfinished"></translation>
865885
</message>
866886
<message>
867-
<location filename="../../services/auto_labeling/model_manager.py" line="365"/>
887+
<location filename="../../services/auto_labeling/model_manager.py" line="381"/>
868888
<source>Finished inferencing AI model. Check the result.</source>
869889
<translation type="unfinished"></translation>
870890
</message>
871891
<message>
872-
<location filename="../../services/auto_labeling/model_manager.py" line="380"/>
892+
<location filename="../../services/auto_labeling/model_manager.py" line="396"/>
873893
<source>Inferencing AI model. Please wait...</source>
874894
<translation type="unfinished"></translation>
875895
</message>
876896
<message>
877-
<location filename="../../services/auto_labeling/model_manager.py" line="390"/>
897+
<location filename="../../services/auto_labeling/model_manager.py" line="406"/>
878898
<source>Another model is being executed. Please wait for it to finish.</source>
879899
<translation type="unfinished"></translation>
880900
</message>
881901
<message>
882-
<location filename="../../services/auto_labeling/model_manager.py" line="146"/>
902+
<location filename="../../services/auto_labeling/model_manager.py" line="147"/>
883903
<source>Error in loading custom model: Invalid path.</source>
884904
<translation type="unfinished"></translation>
885905
</message>
886906
<message>
887-
<location filename="../../services/auto_labeling/model_manager.py" line="157"/>
907+
<location filename="../../services/auto_labeling/model_manager.py" line="158"/>
888908
<source>Error in loading custom model: Invalid config file.</source>
889909
<translation type="unfinished"></translation>
890910
</message>
891911
<message>
892-
<location filename="../../services/auto_labeling/model_manager.py" line="168"/>
912+
<location filename="../../services/auto_labeling/model_manager.py" line="169"/>
893913
<source>Error in loading custom model: Invalid config file format.</source>
894914
<translation type="unfinished"></translation>
895915
</message>
896916
<message>
897-
<location filename="../../services/auto_labeling/model_manager.py" line="235"/>
917+
<location filename="../../services/auto_labeling/model_manager.py" line="236"/>
898918
<source>Error in loading model: Invalid model name.</source>
899919
<translation type="unfinished"></translation>
900920
</message>
901921
<message>
902-
<location filename="../../services/auto_labeling/model_manager.py" line="310"/>
922+
<location filename="../../services/auto_labeling/model_manager.py" line="326"/>
903923
<source>Error in loading model: {error_message}</source>
904924
<translation type="unfinished"></translation>
905925
</message>
634 Bytes
Binary file not shown.

anylabeling/resources/translations/vi_VN.ts

Lines changed: 45 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -816,7 +816,7 @@ Polygons</source>
816816
<translation>Chữ Nhật</translation>
817817
</message>
818818
<message>
819-
<location filename="../../services/auto_labeling/model.py" line="146"/>
819+
<location filename="../../services/auto_labeling/model.py" line="161"/>
820820
<source>Downloading {download_url}: {percent}%</source>
821821
<translation>Đang tải {download_url}: {percent}%</translation>
822822
</message>
@@ -826,40 +826,70 @@ Polygons</source>
826826
<translation>Đa Giác</translation>
827827
</message>
828828
<message>
829-
<location filename="../../services/auto_labeling/model.py" line="91"/>
829+
<location filename="../../services/auto_labeling/model.py" line="106"/>
830830
<source>Downloading model from registry...</source>
831831
<translation>Đang tải mô hình...</translation>
832832
</message>
833833
<message>
834-
<location filename="../../services/auto_labeling/model.py" line="86"/>
834+
<location filename="../../services/auto_labeling/model.py" line="101"/>
835835
<source>Model path not found: {model_path}</source>
836836
<translation>Không tìm thấy đường dẫn mô hình: {model_path}</translation>
837837
</message>
838+
<message>
839+
<location filename="../../services/auto_labeling/yolov8.py" line="44"/>
840+
<source>Could not download or initialize YOLOv8 model.</source>
841+
<translation>Không thể tải về hoặc khởi tạo mô hình YOLOv8.</translation>
842+
</message>
843+
<message>
844+
<location filename="../../services/auto_labeling/model.py" line="51"/>
845+
<source>Config file not found: {model_config}</source>
846+
<translation>Không tìm thấy tệp cấu hình: {model_config}</translation>
847+
</message>
848+
<message>
849+
<location filename="../../services/auto_labeling/model.py" line="61"/>
850+
<source>Unknown config type: {type}</source>
851+
<translation>Loại cấu hình không xác định: {type}</translation>
852+
</message>
853+
<message>
854+
<location filename="../../services/auto_labeling/segment_anything.py" line="61"/>
855+
<source>Could not download or initialize encoder of Segment Anything.</source>
856+
<translation type="obsolete">Không thể tải về hoặc khởi tạo bộ mã hóa (encoder) của Segment Anything.</translation>
857+
</message>
858+
<message>
859+
<location filename="../../services/auto_labeling/segment_anything.py" line="68"/>
860+
<source>Could not download or initialize decoder of Segment Anything.</source>
861+
<translation type="obsolete">Không thể tải về hoặc khởi tạo bộ giải mã (decoder) của Segment Anything.</translation>
862+
</message>
863+
<message>
864+
<location filename="../../services/auto_labeling/yolov5.py" line="44"/>
865+
<source>Could not download or initialize YOLOv5 model.</source>
866+
<translation>Không thể tải về hoặc khởi tạo mô hình YOLOv5.</translation>
867+
</message>
838868
</context>
839869
<context>
840870
<name>ModelManager</name>
841871
<message>
842-
<location filename="../../services/auto_labeling/model_manager.py" line="376"/>
872+
<location filename="../../services/auto_labeling/model_manager.py" line="392"/>
843873
<source>Model is not loaded. Choose a mode to continue.</source>
844874
<translation>Chưa nạp mô hình. Vui lòng chọn một mô hình để tiếp tục.</translation>
845875
</message>
846876
<message>
847-
<location filename="../../services/auto_labeling/model_manager.py" line="362"/>
877+
<location filename="../../services/auto_labeling/model_manager.py" line="378"/>
848878
<source>Error in model prediction. Please check the model.</source>
849879
<translation>Lỗi trong quá trình dự đoán. Vui lòng kiểm tra mô hình.</translation>
850880
</message>
851881
<message>
852-
<location filename="../../services/auto_labeling/model_manager.py" line="365"/>
882+
<location filename="../../services/auto_labeling/model_manager.py" line="381"/>
853883
<source>Finished inferencing AI model. Check the result.</source>
854884
<translation>Đã hoàn thành dự đoán AI. Vui lòng kiểm tra kết quả.</translation>
855885
</message>
856886
<message>
857-
<location filename="../../services/auto_labeling/model_manager.py" line="380"/>
887+
<location filename="../../services/auto_labeling/model_manager.py" line="396"/>
858888
<source>Inferencing AI model. Please wait...</source>
859889
<translation>Đang chạy mô hình AI. Xin chờ chút...</translation>
860890
</message>
861891
<message>
862-
<location filename="../../services/auto_labeling/model_manager.py" line="390"/>
892+
<location filename="../../services/auto_labeling/model_manager.py" line="406"/>
863893
<source>Another model is being executed. Please wait for it to finish.</source>
864894
<translation>Một mô hình AI khác đang được thực thi. Vui lòng đợi đến khi hoàn thành.</translation>
865895
</message>
@@ -869,37 +899,37 @@ Polygons</source>
869899
<translation>Mô hình đã được nạp. Sẵn sàng để gán nhãn.</translation>
870900
</message>
871901
<message>
872-
<location filename="../../services/auto_labeling/model_manager.py" line="241"/>
902+
<location filename="../../services/auto_labeling/model_manager.py" line="242"/>
873903
<source>Loading model: {model_name}. Please wait...</source>
874904
<translation>Đang nạp mô hình: {model_name}. Xin chờ...</translation>
875905
</message>
876906
<message>
877-
<location filename="../../services/auto_labeling/model_manager.py" line="225"/>
907+
<location filename="../../services/auto_labeling/model_manager.py" line="226"/>
878908
<source>No model selected.</source>
879909
<translation>Chưa chọn mô hình.</translation>
880910
</message>
881911
<message>
882-
<location filename="../../services/auto_labeling/model_manager.py" line="146"/>
912+
<location filename="../../services/auto_labeling/model_manager.py" line="147"/>
883913
<source>Error in loading custom model: Invalid path.</source>
884914
<translation>Lỗi trong quá trình nạp mô hình: Đường dẫn không hợp lệ.</translation>
885915
</message>
886916
<message>
887-
<location filename="../../services/auto_labeling/model_manager.py" line="157"/>
917+
<location filename="../../services/auto_labeling/model_manager.py" line="158"/>
888918
<source>Error in loading custom model: Invalid config file.</source>
889919
<translation>Lỗi trong quá trình nạp mô hình: Tệp cấu hình không hợp lệ.</translation>
890920
</message>
891921
<message>
892-
<location filename="../../services/auto_labeling/model_manager.py" line="168"/>
922+
<location filename="../../services/auto_labeling/model_manager.py" line="169"/>
893923
<source>Error in loading custom model: Invalid config file format.</source>
894924
<translation>Lỗi trong quá trình nạp mô hình: Định dạng tệp cấu hình không hợp lệ.</translation>
895925
</message>
896926
<message>
897-
<location filename="../../services/auto_labeling/model_manager.py" line="235"/>
927+
<location filename="../../services/auto_labeling/model_manager.py" line="236"/>
898928
<source>Error in loading model: Invalid model name.</source>
899929
<translation>Lỗi trong quá trình nạp mô hình: Tên mô hình không hợp lệ.</translation>
900930
</message>
901931
<message>
902-
<location filename="../../services/auto_labeling/model_manager.py" line="310"/>
932+
<location filename="../../services/auto_labeling/model_manager.py" line="326"/>
903933
<source>Error in loading model: {error_message}</source>
904934
<translation>Lỗi trong quá trình nạp mô hình: {error_message}</translation>
905935
</message>
432 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)