diff --git a/app/configs/default.py b/app/configs/default.py index 010611c..9b73cc4 100644 --- a/app/configs/default.py +++ b/app/configs/default.py @@ -8,8 +8,8 @@ DEBUG = True SECRET_KEY = 'WugjsfiYBEVsiQfiSwEbIOEAGnOIFYqoOYHEIK' # 数据库配置 -# SQLALCHEMY_DATABASE_URI = 'postgresql+psycopg2://deepLearner:dp2021@124.71.203.3:5432/demo' -SQLALCHEMY_DATABASE_URI = 'mysql+pymysql://demo:demo123@192.168.2.9:3306/flask_demo' +SQLALCHEMY_DATABASE_URI = 'postgresql+psycopg2://deepLearner:dp2021@124.71.203.3:5432/demo' +#SQLALCHEMY_DATABASE_URI = 'mysql+pymysql://demo:demo123@192.168.2.9:3306/flask_demo' SQLALCHEMY_TRACK_MODIFICATIONS = False # 查询时会显示原始SQL语句 SQLALCHEMY_ECHO = True @@ -21,7 +21,7 @@ SQLALCHEMY_ECHO = True db = { 'host': '127.0.0.1', 'user': 'root', - 'password': '', + 'password': 'sdust2020', 'port': 6379, 'database': 'school', 'charset': 'utf8', diff --git a/app/run.py b/app/run.py index f302f58..6120ee2 100644 --- a/app/run.py +++ b/app/run.py @@ -9,8 +9,8 @@ from flask.helpers import get_env from flask_sockets import Sockets import sys -#sys.path.append("/mnt/sdc/algorithm/AICheck-MaskRCNN") -sys.path.append('E:/alg_demo-master/alg_demo/app/yolov5') +sys.path.append("/mnt/sdc/algorithm/R-ODY") +# sys.path.append('E:/alg_demo-master/alg_demo/app/yolov5') from app.core.common_utils import logger from app.core.err_handler import page_not_found, method_not_allowed, exception_500, exception_400 @@ -127,5 +127,5 @@ if __name__ == '__main__': from geventwebsocket.handler import WebSocketHandler #8080 6913 '192.168.0.20' - server = pywsgi.WSGIServer(('192.168.2.118', 6914), app, handler_class=WebSocketHandler) + server = pywsgi.WSGIServer(('192.168.0.20', 6914), app, handler_class=WebSocketHandler) server.serve_forever() diff --git a/app/utils/redis_config.py b/app/utils/redis_config.py index 91a1f59..2ceab0c 100644 --- a/app/utils/redis_config.py +++ b/app/utils/redis_config.py @@ -5,7 +5,7 @@ import sys import redis -from ..configs import default +from configs import default class RedisCli(object): diff --git a/app/utils/websocket_tool.py b/app/utils/websocket_tool.py index e69defd..072757a 100644 --- a/app/utils/websocket_tool.py +++ b/app/utils/websocket_tool.py @@ -10,8 +10,8 @@ import json from typing import Union, List, Dict -from app.core.common_utils import logger -from app.utils.JSONEncodeTools import MyEncoder +from core.common_utils import logger +from utils.JSONEncodeTools import MyEncoder class WebsocketUtil: @@ -57,4 +57,4 @@ class WebsocketUtil: self.disconnect(ws=connection, id=id) -manager = WebsocketUtil() \ No newline at end of file +manager = WebsocketUtil() diff --git a/app/yolov5/data/coco128.yaml b/app/yolov5/data/coco128.yaml index 31e0cf5..92dfe61 100644 --- a/app/yolov5/data/coco128.yaml +++ b/app/yolov5/data/coco128.yaml @@ -1,7 +1,7 @@ path: null -train: E:/aicheck/data_set/11442136178662604800/trained/images/train/ -val: E:/aicheck/data_set/11442136178662604800/trained/images/val/ +train: /mnt/sdc/aicheck/IntelligentizeAI/data_set/114421361786626048/trained/images/train/ +val: /mnt/sdc/aicheck/IntelligentizeAI/data_set/114421361786626048/trained/images/val/ test: null names: - 0: logo - 1: 3C + 0: hole + 1: '456' diff --git a/nohup.out b/nohup.out index be57dd0..d74bbf6 100644 --- a/nohup.out +++ b/nohup.out @@ -1,338 +1,4 @@ -nohup: ignoring input -[INFO] select pg_catalog.version() (base.py:1853) -[INFO] [raw sql] {} (base.py:1858) -[INFO] select current_schema() (base.py:1853) -[INFO] [raw sql] {} (base.py:1858) -[INFO] show standard_conforming_strings (base.py:1853) -[INFO] [raw sql] {} (base.py:1858) -[INFO] BEGIN (implicit) (base.py:1027) -[INFO] select relname from pg_class c join pg_namespace n on n.oid=c.relnamespace where pg_catalog.pg_table_is_visible(c.oid) and relname=%(name)s (base.py:1853) -[INFO] [generated in 0.00012s] {'name': 'sys_user'} (base.py:1858) -[INFO] select relname from pg_class c join pg_namespace n on n.oid=c.relnamespace where pg_catalog.pg_table_is_visible(c.oid) and relname=%(name)s (base.py:1853) -[INFO] [cached since 0.00606s ago] {'name': 'sys_role'} (base.py:1858) -[INFO] select relname from pg_class c join pg_namespace n on n.oid=c.relnamespace where pg_catalog.pg_table_is_visible(c.oid) and relname=%(name)s (base.py:1853) -[INFO] [cached since 0.009177s ago] {'name': 'rel_user_role'} (base.py:1858) -[INFO] COMMIT (base.py:1087) -[WARNING] This script is aimed to demonstrate how to convert theJSON file to a single image dataset, and not to handlemultiple JSON files to generate a real-use dataset. (labelme2VOCSeg_aicheckFrom.py:101) -[INFO] Saved to: /mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/masks (labelme2VOCSeg_aicheckFrom.py:97) -[INFO] Saved to: /mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/masks (labelme2VOCSeg_aicheckFrom.py:97) -[INFO] Saved to: /mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/masks (labelme2VOCSeg_aicheckFrom.py:97) -[INFO] Saved to: /mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/masks (labelme2VOCSeg_aicheckFrom.py:97) -[INFO] Saved to: /mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/masks (labelme2VOCSeg_aicheckFrom.py:97) -[INFO] Saved to: /mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/masks (labelme2VOCSeg_aicheckFrom.py:97) -[INFO] Saved to: /mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/masks (labelme2VOCSeg_aicheckFrom.py:97) -[INFO] Saved to: /mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/masks (labelme2VOCSeg_aicheckFrom.py:97) -[INFO] Saved to: /mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/masks (labelme2VOCSeg_aicheckFrom.py:97) -[INFO] Saved to: /mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/masks (labelme2VOCSeg_aicheckFrom.py:97) -[INFO] Saved to: /mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/masks (labelme2VOCSeg_aicheckFrom.py:97) -[INFO] Saved to: /mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/masks (labelme2VOCSeg_aicheckFrom.py:97) -[INFO] Saved to: /mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/masks (labelme2VOCSeg_aicheckFrom.py:97) -[INFO] Saved to: /mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/masks (labelme2VOCSeg_aicheckFrom.py:97) -[INFO] Saved to: /mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/masks (labelme2VOCSeg_aicheckFrom.py:97) -[INFO] Saved to: /mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/masks (labelme2VOCSeg_aicheckFrom.py:97) -[INFO] Saved to: /mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/masks (labelme2VOCSeg_aicheckFrom.py:97) -[INFO] Saved to: /mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/masks (labelme2VOCSeg_aicheckFrom.py:97) -[INFO] Saved to: /mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/masks (labelme2VOCSeg_aicheckFrom.py:97) -[INFO] Saved to: /mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/masks (labelme2VOCSeg_aicheckFrom.py:97) -/home/wd/anaconda3/envs/aicheck_maskrcnn/lib/python3.8/site-packages/torchvision/models/_utils.py:208: UserWarning: The parameter 'pretrained' is deprecated since 0.13 and may be removed in the future, please use 'weights' instead. - warnings.warn( -/home/wd/anaconda3/envs/aicheck_maskrcnn/lib/python3.8/site-packages/torchvision/models/_utils.py:223: UserWarning: Arguments other than a weight enum or `None` for 'weights' are deprecated since 0.13 and may be removed in the future. The current behavior is equivalent to passing `weights=None`. - warnings.warn(msg) -/home/wd/anaconda3/envs/aicheck_maskrcnn/lib/python3.8/site-packages/torchvision/models/_utils.py:208: UserWarning: The parameter 'pretrained_backbone' is deprecated since 0.13 and may be removed in the future, please use 'weights_backbone' instead. - warnings.warn( -/home/wd/anaconda3/envs/aicheck_maskrcnn/lib/python3.8/site-packages/torchvision/models/_utils.py:223: UserWarning: Arguments other than a weight enum or `None` for 'weights_backbone' are deprecated since 0.13 and may be removed in the future. The current behavior is equivalent to passing `weights_backbone=None`. - warnings.warn(msg) -Exception in thread Thread-1: Traceback (most recent call last): - File "/home/wd/anaconda3/envs/aicheck_maskrcnn/lib/python3.8/threading.py", line 932, in _bootstrap_inner - self.run() - File "/home/wd/anaconda3/envs/aicheck_maskrcnn/lib/python3.8/threading.py", line 870, in run - self._target(*self._args, **self._kwargs) - File "/mnt/sdc/algorithm/AICheck-MaskRCNN/app/controller/AlgorithmController.py", line 207, in main - train_tesk.StarTrain() - File "/mnt/sdc/algorithm/AICheck-MaskRCNN/app/maskrcnn/train.py", line 180, in StarTrain - _loop() - File "/mnt/sdc/algorithm/AICheck-MaskRCNN/app/controller/AlgorithmController.py", line 112, in wrapped_function - data = func(*args, **kwargs) - File "/mnt/sdc/algorithm/AICheck-MaskRCNN/app/maskrcnn/train.py", line 159, in _loop - self.train_one_epoch(model, optimizer, data_loader, device, epoch, print_freq=10) - File "/mnt/sdc/algorithm/AICheck-MaskRCNN/app/maskrcnn/train.py", line 73, in train_one_epoch - for images, targets in metric_logger.log_every(data_loader, print_freq, header): - File "/mnt/sdc/algorithm/AICheck-MaskRCNN/app/maskrcnn/utilss.py", line 171, in log_every - for obj in iterable: - File "/home/wd/anaconda3/envs/aicheck_maskrcnn/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 628, in __next__ - data = self._next_data() - File "/home/wd/anaconda3/envs/aicheck_maskrcnn/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 671, in _next_data - data = self._dataset_fetcher.fetch(index) # may raise StopIteration - File "/home/wd/anaconda3/envs/aicheck_maskrcnn/lib/python3.8/site-packages/torch/utils/data/_utils/fetch.py", line 58, in fetch - data = [self.dataset[idx] for idx in possibly_batched_index] - File "/home/wd/anaconda3/envs/aicheck_maskrcnn/lib/python3.8/site-packages/torch/utils/data/_utils/fetch.py", line 58, in - data = [self.dataset[idx] for idx in possibly_batched_index] - File "/mnt/sdc/algorithm/AICheck-MaskRCNN/app/maskrcnn/Dataset.py", line 58, in __getitem__ - area = (boxes[:, 3] - boxes[:, 1]) * (boxes[:, 2] - boxes[:, 0]) -IndexError: too many indices for tensor of dimension 1 -[WARNING] This script is aimed to demonstrate how to convert theJSON file to a single image dataset, and not to handlemultiple JSON files to generate a real-use dataset. (labelme2VOCSeg_aicheckFrom.py:101) -[INFO] Saved to: /mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/masks (labelme2VOCSeg_aicheckFrom.py:97) -[INFO] Saved to: /mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/masks (labelme2VOCSeg_aicheckFrom.py:97) -[INFO] Saved to: /mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/masks (labelme2VOCSeg_aicheckFrom.py:97) -[INFO] Saved to: /mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/masks (labelme2VOCSeg_aicheckFrom.py:97) -[INFO] Saved to: /mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/masks (labelme2VOCSeg_aicheckFrom.py:97) -[INFO] Saved to: /mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/masks (labelme2VOCSeg_aicheckFrom.py:97) -[INFO] Saved to: /mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/masks (labelme2VOCSeg_aicheckFrom.py:97) -[INFO] Saved to: /mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/masks (labelme2VOCSeg_aicheckFrom.py:97) -[INFO] Saved to: /mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/masks (labelme2VOCSeg_aicheckFrom.py:97) -[INFO] Saved to: /mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/masks (labelme2VOCSeg_aicheckFrom.py:97) -[INFO] Saved to: /mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/masks (labelme2VOCSeg_aicheckFrom.py:97) -[INFO] Saved to: /mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/masks (labelme2VOCSeg_aicheckFrom.py:97) -[INFO] Saved to: /mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/masks (labelme2VOCSeg_aicheckFrom.py:97) -[INFO] Saved to: /mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/masks (labelme2VOCSeg_aicheckFrom.py:97) -[INFO] Saved to: /mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/masks (labelme2VOCSeg_aicheckFrom.py:97) -[INFO] Saved to: /mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/masks (labelme2VOCSeg_aicheckFrom.py:97) -[INFO] Saved to: /mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/masks (labelme2VOCSeg_aicheckFrom.py:97) -[INFO] Saved to: /mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/masks (labelme2VOCSeg_aicheckFrom.py:97) -[INFO] Saved to: /mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/masks (labelme2VOCSeg_aicheckFrom.py:97) -[INFO] Saved to: /mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/masks (labelme2VOCSeg_aicheckFrom.py:97) -Exception in thread Thread-2: -Traceback (most recent call last): - File "/home/wd/anaconda3/envs/aicheck_maskrcnn/lib/python3.8/threading.py", line 932, in _bootstrap_inner - self.run() - File "/home/wd/anaconda3/envs/aicheck_maskrcnn/lib/python3.8/threading.py", line 870, in run - self._target(*self._args, **self._kwargs) - File "/mnt/sdc/algorithm/AICheck-MaskRCNN/app/controller/AlgorithmController.py", line 207, in main - train_tesk.StarTrain() - File "/mnt/sdc/algorithm/AICheck-MaskRCNN/app/maskrcnn/train.py", line 180, in StarTrain - _loop() - File "/mnt/sdc/algorithm/AICheck-MaskRCNN/app/controller/AlgorithmController.py", line 112, in wrapped_function - data = func(*args, **kwargs) - File "/mnt/sdc/algorithm/AICheck-MaskRCNN/app/maskrcnn/train.py", line 159, in _loop - self.train_one_epoch(model, optimizer, data_loader, device, epoch, print_freq=10) - File "/mnt/sdc/algorithm/AICheck-MaskRCNN/app/maskrcnn/train.py", line 73, in train_one_epoch - for images, targets in metric_logger.log_every(data_loader, print_freq, header): - File "/mnt/sdc/algorithm/AICheck-MaskRCNN/app/maskrcnn/utilss.py", line 171, in log_every - for obj in iterable: - File "/home/wd/anaconda3/envs/aicheck_maskrcnn/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 628, in __next__ - data = self._next_data() - File "/home/wd/anaconda3/envs/aicheck_maskrcnn/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 671, in _next_data - data = self._dataset_fetcher.fetch(index) # may raise StopIteration - File "/home/wd/anaconda3/envs/aicheck_maskrcnn/lib/python3.8/site-packages/torch/utils/data/_utils/fetch.py", line 58, in fetch - data = [self.dataset[idx] for idx in possibly_batched_index] - File "/home/wd/anaconda3/envs/aicheck_maskrcnn/lib/python3.8/site-packages/torch/utils/data/_utils/fetch.py", line 58, in - data = [self.dataset[idx] for idx in possibly_batched_index] - File "/mnt/sdc/algorithm/AICheck-MaskRCNN/app/maskrcnn/Dataset.py", line 58, in __getitem__ - area = (boxes[:, 3] - boxes[:, 1]) * (boxes[:, 2] - boxes[:, 0]) -IndexError: too many indices for tensor of dimension 1 -[WARNING] This script is aimed to demonstrate how to convert theJSON file to a single image dataset, and not to handlemultiple JSON files to generate a real-use dataset. (labelme2VOCSeg_aicheckFrom.py:101) -[INFO] Saved to: /mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/masks (labelme2VOCSeg_aicheckFrom.py:97) -[INFO] Saved to: /mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/masks (labelme2VOCSeg_aicheckFrom.py:97) -[INFO] Saved to: /mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/masks (labelme2VOCSeg_aicheckFrom.py:97) -[INFO] Saved to: /mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/masks (labelme2VOCSeg_aicheckFrom.py:97) -[INFO] Saved to: /mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/masks (labelme2VOCSeg_aicheckFrom.py:97) -[INFO] Saved to: /mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/masks (labelme2VOCSeg_aicheckFrom.py:97) -[INFO] Saved to: /mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/masks (labelme2VOCSeg_aicheckFrom.py:97) -[INFO] Saved to: /mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/masks (labelme2VOCSeg_aicheckFrom.py:97) -[INFO] Saved to: /mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/masks (labelme2VOCSeg_aicheckFrom.py:97) -[INFO] Saved to: /mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/masks (labelme2VOCSeg_aicheckFrom.py:97) -[INFO] Saved to: /mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/masks (labelme2VOCSeg_aicheckFrom.py:97) -[INFO] Saved to: /mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/masks (labelme2VOCSeg_aicheckFrom.py:97) -[INFO] Saved to: /mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/masks (labelme2VOCSeg_aicheckFrom.py:97) -[INFO] Saved to: /mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/masks (labelme2VOCSeg_aicheckFrom.py:97) -[INFO] Saved to: /mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/masks (labelme2VOCSeg_aicheckFrom.py:97) -[INFO] Saved to: /mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/masks (labelme2VOCSeg_aicheckFrom.py:97) -[INFO] Saved to: /mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/masks (labelme2VOCSeg_aicheckFrom.py:97) -[INFO] Saved to: /mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/masks (labelme2VOCSeg_aicheckFrom.py:97) -[INFO] Saved to: /mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/masks (labelme2VOCSeg_aicheckFrom.py:97) -Exception in thread Thread-3: -Traceback (most recent call last): - File "/home/wd/anaconda3/envs/aicheck_maskrcnn/lib/python3.8/threading.py", line 932, in _bootstrap_inner - self.run() - File "/home/wd/anaconda3/envs/aicheck_maskrcnn/lib/python3.8/threading.py", line 870, in run - self._target(*self._args, **self._kwargs) - File "/mnt/sdc/algorithm/AICheck-MaskRCNN/app/controller/AlgorithmController.py", line 207, in main - train_tesk.StarTrain() - File "/mnt/sdc/algorithm/AICheck-MaskRCNN/app/maskrcnn/train.py", line 180, in StarTrain - _loop() - File "/mnt/sdc/algorithm/AICheck-MaskRCNN/app/controller/AlgorithmController.py", line 112, in wrapped_function - data = func(*args, **kwargs) - File "/mnt/sdc/algorithm/AICheck-MaskRCNN/app/maskrcnn/train.py", line 159, in _loop - self.train_one_epoch(model, optimizer, data_loader, device, epoch, print_freq=10) - File "/mnt/sdc/algorithm/AICheck-MaskRCNN/app/maskrcnn/train.py", line 73, in train_one_epoch - for images, targets in metric_logger.log_every(data_loader, print_freq, header): - File "/mnt/sdc/algorithm/AICheck-MaskRCNN/app/maskrcnn/utilss.py", line 171, in log_every - for obj in iterable: - File "/home/wd/anaconda3/envs/aicheck_maskrcnn/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 628, in __next__ - data = self._next_data() - File "/home/wd/anaconda3/envs/aicheck_maskrcnn/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 671, in _next_data - data = self._dataset_fetcher.fetch(index) # may raise StopIteration - File "/home/wd/anaconda3/envs/aicheck_maskrcnn/lib/python3.8/site-packages/torch/utils/data/_utils/fetch.py", line 58, in fetch - data = [self.dataset[idx] for idx in possibly_batched_index] - File "/home/wd/anaconda3/envs/aicheck_maskrcnn/lib/python3.8/site-packages/torch/utils/data/_utils/fetch.py", line 58, in - data = [self.dataset[idx] for idx in possibly_batched_index] - File "/mnt/sdc/algorithm/AICheck-MaskRCNN/app/maskrcnn/Dataset.py", line 58, in __getitem__ - area = (boxes[:, 3] - boxes[:, 1]) * (boxes[:, 2] - boxes[:, 0]) -IndexError: too many indices for tensor of dimension 1 -[WARNING] This script is aimed to demonstrate how to convert theJSON file to a single image dataset, and not to handlemultiple JSON files to generate a real-use dataset. (labelme2VOCSeg_aicheckFrom.py:101) -[INFO] Saved to: /mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182423143779016704/ori/masks (labelme2VOCSeg_aicheckFrom.py:97) -[INFO] Saved to: /mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182423143779016704/ori/masks (labelme2VOCSeg_aicheckFrom.py:97) -[INFO] Saved to: /mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182423143779016704/ori/masks (labelme2VOCSeg_aicheckFrom.py:97) -[INFO] Saved to: /mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182423143779016704/ori/masks (labelme2VOCSeg_aicheckFrom.py:97) -[INFO] Saved to: /mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182423143779016704/ori/masks (labelme2VOCSeg_aicheckFrom.py:97) -[INFO] Saved to: /mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182423143779016704/ori/masks (labelme2VOCSeg_aicheckFrom.py:97) -[INFO] Saved to: /mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182423143779016704/ori/masks (labelme2VOCSeg_aicheckFrom.py:97) -[INFO] Saved to: /mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182423143779016704/ori/masks (labelme2VOCSeg_aicheckFrom.py:97) -[INFO] Saved to: /mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182423143779016704/ori/masks (labelme2VOCSeg_aicheckFrom.py:97) -[INFO] Saved to: /mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182423143779016704/ori/masks (labelme2VOCSeg_aicheckFrom.py:97) -Exception in thread Thread-4: -Traceback (most recent call last): - File "/home/wd/anaconda3/envs/aicheck_maskrcnn/lib/python3.8/threading.py", line 932, in _bootstrap_inner - self.run() - File "/home/wd/anaconda3/envs/aicheck_maskrcnn/lib/python3.8/threading.py", line 870, in run - self._target(*self._args, **self._kwargs) - File "/mnt/sdc/algorithm/AICheck-MaskRCNN/app/controller/AlgorithmController.py", line 207, in main - train_tesk.StarTrain() - File "/mnt/sdc/algorithm/AICheck-MaskRCNN/app/maskrcnn/train.py", line 180, in StarTrain - _loop() - File "/mnt/sdc/algorithm/AICheck-MaskRCNN/app/controller/AlgorithmController.py", line 112, in wrapped_function - data = func(*args, **kwargs) - File "/mnt/sdc/algorithm/AICheck-MaskRCNN/app/maskrcnn/train.py", line 159, in _loop - self.train_one_epoch(model, optimizer, data_loader, device, epoch, print_freq=10) - File "/mnt/sdc/algorithm/AICheck-MaskRCNN/app/maskrcnn/train.py", line 73, in train_one_epoch - for images, targets in metric_logger.log_every(data_loader, print_freq, header): - File "/mnt/sdc/algorithm/AICheck-MaskRCNN/app/maskrcnn/utilss.py", line 171, in log_every - for obj in iterable: - File "/home/wd/anaconda3/envs/aicheck_maskrcnn/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 628, in __next__ - data = self._next_data() - File "/home/wd/anaconda3/envs/aicheck_maskrcnn/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 671, in _next_data - data = self._dataset_fetcher.fetch(index) # may raise StopIteration - File "/home/wd/anaconda3/envs/aicheck_maskrcnn/lib/python3.8/site-packages/torch/utils/data/_utils/fetch.py", line 58, in fetch - data = [self.dataset[idx] for idx in possibly_batched_index] - File "/home/wd/anaconda3/envs/aicheck_maskrcnn/lib/python3.8/site-packages/torch/utils/data/_utils/fetch.py", line 58, in - data = [self.dataset[idx] for idx in possibly_batched_index] - File "/mnt/sdc/algorithm/AICheck-MaskRCNN/app/maskrcnn/Dataset.py", line 58, in __getitem__ - area = (boxes[:, 3] - boxes[:, 1]) * (boxes[:, 2] - boxes[:, 0]) -IndexError: too many indices for tensor of dimension 1 -[WARNING] This script is aimed to demonstrate how to convert theJSON file to a single image dataset, and not to handlemultiple JSON files to generate a real-use dataset. (labelme2VOCSeg_aicheckFrom.py:101) -[INFO] Saved to: /mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182423143779016704/ori/masks (labelme2VOCSeg_aicheckFrom.py:97) -[INFO] Saved to: /mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182423143779016704/ori/masks (labelme2VOCSeg_aicheckFrom.py:97) -[INFO] Saved to: /mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182423143779016704/ori/masks (labelme2VOCSeg_aicheckFrom.py:97) -CUDA is available! -cuda -/mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/masks -/mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/labels/tucengbuliang_a_26.json -Polygon must have points more than 2 -/mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/labels/tucengbuliang_a_5.json -/mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/labels/tucengbuliang_a_38.json -/mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/labels/tucengbuliang_a_23.json -/mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/labels/tucengbuliang_a_46.json -/mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/labels/tucengbuliang_a_17.json -/mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/labels/tucengbuliang_a_14.json -/mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/labels/tucengbuliang_a_30.json -/mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/labels/tucengbuliang_a_42.json -/mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/labels/tucengbuliang_a_22.json -/mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/labels/tucengbuliang_a_13.json -/mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/labels/tucengbuliang_a_11.json -/mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/labels/tucengbuliang_a_51.json -/mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/labels/tucengbuliang_a_0.json -/mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/labels/tucengbuliang_a_27.json -/mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/labels/tucengbuliang_a_8.json -/mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/labels/tucengbuliang_a_1.json -/mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/labels/tucengbuliang_a_4.json -/mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/labels/tucengbuliang_a_10.json -/mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/labels/tucengbuliang_a_12.json -None -cuda -/mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/masks -/mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/labels/tucengbuliang_a_26.json -Polygon must have points more than 2 -/mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/labels/tucengbuliang_a_5.json -/mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/labels/tucengbuliang_a_38.json -/mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/labels/tucengbuliang_a_23.json -/mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/labels/tucengbuliang_a_46.json -/mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/labels/tucengbuliang_a_17.json -/mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/labels/tucengbuliang_a_14.json -/mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/labels/tucengbuliang_a_30.json -/mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/labels/tucengbuliang_a_42.json -/mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/labels/tucengbuliang_a_22.json -/mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/labels/tucengbuliang_a_13.json -/mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/labels/tucengbuliang_a_11.json -/mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/labels/tucengbuliang_a_51.json -/mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/labels/tucengbuliang_a_0.json -/mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/labels/tucengbuliang_a_27.json -/mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/labels/tucengbuliang_a_8.json -/mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/labels/tucengbuliang_a_1.json -/mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/labels/tucengbuliang_a_4.json -/mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/labels/tucengbuliang_a_10.json -/mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/labels/tucengbuliang_a_12.json -cuda -/mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/masks -/mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/labels/tucengbuliang_a_5.json -/mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/labels/tucengbuliang_a_38.json -/mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/labels/tucengbuliang_a_23.json -/mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/labels/tucengbuliang_a_46.json -/mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/labels/tucengbuliang_a_17.json -/mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/labels/tucengbuliang_a_14.json -/mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/labels/tucengbuliang_a_30.json -/mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/labels/tucengbuliang_a_42.json -/mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/labels/tucengbuliang_a_22.json -/mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/labels/tucengbuliang_a_13.json -/mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/labels/tucengbuliang_a_11.json -/mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/labels/tucengbuliang_a_51.json -/mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/labels/tucengbuliang_a_0.json -/mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/labels/tucengbuliang_a_27.json -/mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/labels/tucengbuliang_a_8.json -/mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/labels/tucengbuliang_a_1.json -/mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/labels/tucengbuliang_a_4.json -/mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/labels/tucengbuliang_a_10.json -/mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182075175733436416/ori/labels/tucengbuliang_a_12.json -cuda -/mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182423143779016704/ori/masks -/mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182423143779016704/ori/labels/tucengbuliang_a_5.json -/mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182423143779016704/ori/labels/tucengbuliang_a_23.json -/mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182423143779016704/ori/labels/tucengbuliang_a_46.json -/mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182423143779016704/ori/labels/tucengbuliang_a_14.json -Polygon must have points more than 2 -/mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182423143779016704/ori/labels/tucengbuliang_a_55.json -/mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182423143779016704/ori/labels/tucengbuliang_a_30.json -/mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182423143779016704/ori/labels/tucengbuliang_a_77.json -/mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182423143779016704/ori/labels/tucengbuliang_a_67.json -/mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182423143779016704/ori/labels/tucengbuliang_a_11.json -/mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182423143779016704/ori/labels/tucengbuliang_a_0.json -cuda -/mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182423143779016704/ori/masks -/mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182423143779016704/ori/labels/tucengbuliang_a_5.json -/mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182423143779016704/ori/labels/tucengbuliang_a_23.json -/mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182423143779016704/ori/labels/tucengbuliang_a_46.json -[INFO] Saved to: /mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182423143779016704/ori/masks (labelme2VOCSeg_aicheckFrom.py:97) -[INFO] Saved to: /mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182423143779016704/ori/masks (labelme2VOCSeg_aicheckFrom.py:97) -[INFO] Saved to: /mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182423143779016704/ori/masks (labelme2VOCSeg_aicheckFrom.py:97) -[INFO] Saved to: /mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182423143779016704/ori/masks (labelme2VOCSeg_aicheckFrom.py:97) -[INFO] Saved to: /mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182423143779016704/ori/masks (labelme2VOCSeg_aicheckFrom.py:97) -[INFO] Saved to: /mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/182423143779016704/ori/masks (labelme2VOCSeg_aicheckFrom.py:97) -Exception in thread Thread-5: -Traceback (most recent call last): - File "/home/wd/anaconda3/envs/aicheck_maskrcnn/lib/python3.8/threading.py", line 932, in _bootstrap_inner - self.run() - File "/home/wd/anaconda3/envs/aicheck_maskrcnn/lib/python3.8/threading.py", line 870, in run - self._target(*self._args, **self._kwargs) - File "/mnt/sdc/algorithm/AICheck-MaskRCNN/app/controller/AlgorithmController.py", line 207, in main - train_tesk.StarTrain() - File "/mnt/sdc/algorithm/AICheck-MaskRCNN/app/maskrcnn/train.py", line 180, in StarTrain - _loop() - File "/mnt/sdc/algorithm/AICheck-MaskRCNN/app/controller/AlgorithmController.py", line 112, in wrapped_function - data = func(*args, **kwargs) - File "/mnt/sdc/algorithm/AICheck-MaskRCNN/app/maskrcnn/train.py", line 159, in _loop - self.train_one_epoch(model, optimizer, data_loader, device, epoch, print_freq=10) - File "/mnt/sdc/algorithm/AICheck-MaskRCNN/app/maskrcnn/train.py", line 73, in train_one_epoch - for images, targets in metric_logger.log_every(data_loader, print_freq, header): - File "/mnt/sdc/algorithm/AICheck-MaskRCNN/app/maskrcnn/utilss.py", line 171, in log_every - for obj in iterable: - File "/home/wd/anaconda3/envs/aicheck_maskrcnn/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 628, in __next__ - data = self._next_data() - File "/home/wd/anaconda3/envs/aicheck_maskrcnn/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 671, in _next_data - data = self._dataset_fetcher.fetch(index) # may raise StopIteration - File "/home/wd/anaconda3/envs/aicheck_maskrcnn/lib/python3.8/site-packages/torch/utils/data/_utils/fetch.py", line 58, in fetch - data = [self.dataset[idx] for idx in possibly_batched_index] - File "/home/wd/anaconda3/envs/aicheck_maskrcnn/lib/python3.8/site-packages/torch/utils/data/_utils/fetch.py", line 58, in - data = [self.dataset[idx] for idx in possibly_batched_index] - File "/mnt/sdc/algorithm/AICheck-MaskRCNN/app/maskrcnn/Dataset.py", line 58, in __getitem__ - area = (boxes[:, 3] - boxes[:, 1]) * (boxes[:, 2] - boxes[:, 0]) -IndexError: too many indices for tensor of dimension 1 + File "./app/run.py", line 14, in + from app.core.common_utils import logger +ModuleNotFoundError: No module named 'app' diff --git a/requirements.txt b/requirements.txt index b271eaa..789105d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -78,7 +78,7 @@ zipp==3.8.1 zope.event==4.5.0 zope.interface==5.5.0 -torch>=1.8.0+cu111 +torch==1.8.0 wandb>=0.12.10 tqdm>=4.64.0 opencv-python>=4.5.5.62 @@ -86,6 +86,6 @@ matplotlib>=3.2.2 pandas>=1.4.3 seaborn>=0.11.2 pillow>=9.0.1 -torchvision>=0.9.0+cu111 +torchvision==0.9.0 requests>=2.27.1 -thop>=0.1.1-2209072238 \ No newline at end of file +thop>=0.1.1-2209072238 diff --git a/start.sh b/start.sh new file mode 100755 index 0000000..59cf124 --- /dev/null +++ b/start.sh @@ -0,0 +1,28 @@ +#!/bin/sh +RESOURCE_NAME=app/run.py + +tpid=`ps -ef|grep $RESOURCE_NAME|grep -v grep|grep -v kill|awk '{print $2}'` +if [ ${tpid} ]; then +echo 'Stop Process...' +kill -15 $tpid +fi +sleep 5 +tpid=`ps -ef|grep $RESOURCE_NAME|grep -v grep|grep -v kill|awk '{print $2}'` +if [ ${tpid} ]; then +echo 'Kill Process!' +kill -9 $tpid +else +echo 'Stop Success!' +fi + +tpid=`ps -ef|grep $RESOURCE_NAME|grep -v grep|grep -v kill|awk '{print $2}'` +if [ ${tpid} ]; then + echo 'App is running.' +else + echo 'App is NOT running.' +fi + +rm -f tpid +nohup python ./$RESOURCE_NAME > nohup.out 2>&1 & +echo $! > tpid +echo Start Success! diff --git a/tpid b/tpid new file mode 100644 index 0000000..d24fafb --- /dev/null +++ b/tpid @@ -0,0 +1 @@ +2544346