feat: Enhance documentation and clean up code structure
- Added comprehensive documentation for the unified screenshot and score recording process in the new markdown file. - Improved existing markdown files by adding spacing for better readability. - Cleaned up code by removing unnecessary blank lines across various scripts, enhancing overall code clarity. - Updated configuration settings to reflect recent changes and ensure consistency across the project. - Enhanced logging mechanisms to support better debugging and monitoring.
This commit is contained in:
1 parent
e68f1dd3de
commit
f92933641f
61 files changed
+103695
-1485
No files matched your search
@@ -9,7 +9,7 @@ import sys
|
||||
# 修复Windows控制台编码问题
|
||||
if sys.platform == "win32":
|
||||
try:
|
||||
sys.stdout.reconfigure(encoding="utf-8")
|
||||
sys.stdout.reconfigure(encoding="utf-8") # type: ignore[attr-defined]
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
@@ -17,7 +17,7 @@ if sys.platform == "win32":
|
||||
def check_torch_cuda():
|
||||
"""检查PyTorch是否支持CUDA"""
|
||||
try:
|
||||
import torch
|
||||
import torch # type: ignore
|
||||
|
||||
if torch.cuda.is_available():
|
||||
print(f"[GPU检测] PyTorch CUDA可用")
|
||||
@@ -40,12 +40,12 @@ def check_torch_cuda():
|
||||
def check_easyocr_gpu():
|
||||
"""检查EasyOCR是否可以使用GPU"""
|
||||
try:
|
||||
import easyocr
|
||||
import easyocr # type: ignore
|
||||
|
||||
print("[GPU检测] EasyOCR已安装")
|
||||
# EasyOCR使用PyTorch,所以需要PyTorch支持CUDA
|
||||
try:
|
||||
import torch
|
||||
import torch # type: ignore
|
||||
|
||||
if torch.cuda.is_available():
|
||||
print("[GPU检测] EasyOCR可以使用GPU(通过PyTorch CUDA)")
|
||||
@@ -96,7 +96,7 @@ def check_paddleocr_gpu():
|
||||
def check_integrated_graphics():
|
||||
"""检查是否是集成显卡(核显)"""
|
||||
try:
|
||||
import torch
|
||||
import torch # type: ignore
|
||||
|
||||
if torch.cuda.is_available():
|
||||
for i in range(torch.cuda.device_count()):
|
||||
|
||||
Reference in new issue
Block a user