refactor:调整部分结构,删去不用的库

This commit is contained in:
TG 2024-06-26 23:48:36 +08:00
parent 68fd790823
commit f10aee7753
4 changed files with 0 additions and 15 deletions

View File

@ -6,7 +6,6 @@
import os
import cv2
import json
import utils
import joblib
import logging
@ -21,7 +20,6 @@ from sklearn.ensemble import RandomForestRegressor
# import torch.nn as nn
# from torchvision import transforms
#番茄RGB处理模型
class Tomato:
def __init__(self, find_reflection_threshold=setting.find_reflection_threshold, extract_g_r_factor=setting.extract_g_r_factor):
@ -709,8 +707,6 @@ class Data_processing:
defect_num=max_defect_num, total_defect_area=max_total_defect_area, rp=rp_result)
return response
# #下面封装的是ResNet18和ResNet34的网络模型构建
# #原定用于构建RGB图像有果无果判断后续发现存在纰漏暂时搁置并未实际使用
# class BasicBlock(nn.Module):

View File

@ -6,17 +6,14 @@
import sys
import os
import cv2
from root_dir import ROOT_DIR
from classifer import Spec_predict, Data_processing
# from classifer import ImageClassifier
import logging
from utils import Pipe
import numpy as np
import time
from config import Config
def main(is_debug=False):
setting = Config()
file_handler = logging.FileHandler(os.path.join(ROOT_DIR, 'tomato.log'), encoding='utf-8')
@ -120,7 +117,6 @@ def main(is_debug=False):
# print(f'第{q}组全流程时间:{(end_time - start_time) * 1000}毫秒')
# q += 1
if __name__ == '__main__':
'''
python与qt采用windows下的命名管道进行通信数据流按照约定的通信协议进行

View File

@ -13,7 +13,6 @@ from PIL import Image
import numpy as np
import cv2
class MainWindow(QMainWindow):
def __init__(self):
super().__init__()

View File

@ -4,8 +4,6 @@
# @File : utils.py
# @Software: PyCharm
import shutil
import os
import win32file
import win32pipe
@ -13,8 +11,6 @@ import time
import logging
import numpy as np
from config import Config as setting
from PIL import Image
import io
class Pipe:
def __init__(self, rgb_receive_name, rgb_send_name, spec_receive_name):
@ -244,7 +240,6 @@ class Pipe:
# print(f'发送时间:{end_time - start_time}秒')
return True
def create_file(file_name):
"""
创建文件
@ -260,7 +255,6 @@ def create_file(file_name):
open(file_name, 'a').close()
return True
class Logger(object):
def __init__(self, is_to_file=False, path=None):
self.is_to_file = is_to_file