主頁 >  其他 > label studio 結合 MMDetection 實作資料集自動標記、模型迭代訓練的倍訓

label studio 結合 MMDetection 實作資料集自動標記、模型迭代訓練的倍訓

2022-11-28 07:17:46 其他

前言

一個 AI 方向的朋友因為標資料集發了篇 SCI 論文,看著他標了兩個多月的資料集這么辛苦,就想著人工智能都能站在圍棋巔峰了,難道不能動動小手為自己標資料嗎?查了一下還真有一些能夠滿足此需求的框架,比如 cvat 、 doccano 、 label studio 等,經過簡單的對比后發現還是 label studio 最好用,本文首先介紹了 label studio 的安裝程序;然后使用 MMDetection 作為后端人臉檢測標記框架,并通過 label studio ml 將 MMDetection 模型封裝成 label studio 后端服務,實作資料集的自動標記[1];最后參考 label studio ml 示例,為自己的 MMDetection 人臉標記模型設計了一種迭代訓練方法,使之能夠不斷隨著標記資料的增加而跟進訓練,最終實作了模型自動標記資料集、資料集更新迭代訓練模型的倍訓,

依賴安裝

本專案涉及的原始碼已開源在 label-studio-demo 中,所使用的軟體版本如下,其中 MMDetection 的版本及配置參考 MMDetection 使用示例:從入門到出門 :

軟體 版本
label-studio 1.6.0
label-studio-ml 1.0.8
label-studio-tools 0.0.1

本文最終專案目錄結構如下:

LabelStudio
├── backend         // 后端功能
│   ├── examples    // label studio ml 官方示例(非必須)
│   ├── mmdetection // mmdetection 人臉檢測模型
│   ├── model       // label studio ml 生成的后端服務 (自動生成)
│   ├── workdir     // 模型訓練時作業目錄
│   |   ├── fcos_common_base.pth    // 后端模型基礎權重檔案
│   |   └── latest.pth              // 后端模型最新權重檔案
│   └── runbackend.bat  // 生成并啟動后端服務的腳本檔案
├── dataset         // 實驗所用資料集(非必須)      
├── label_studio.sqlite3    // label studio 資料庫檔案
├── media      
│   ├── export
│   └── upload  // 上傳的待標記資料集
└── run.bat     // 啟動 label studio 的腳本檔案(非必須)

label studio 安裝啟動

label-studio 是一個開源的多媒體資料標注工具(用來提供基本標注功能的GUI),并且可以很方便的將標注結果匯出為多種常見的資料格式,其安裝方法主要有以下幾種:

  1. Docker
docker pull heartexlabs/label-studio:latest
  1. pip
pip install label-studio

建議是通過 pip 安裝,其配置更清晰方便,環境安裝完成后在任意位置打開命令列,使用以下命令啟動 label studio :

label-studio --data-dir LabelStudio -p 80

其中 --data-dir 用于指定作業目錄, -p 用來指定運行埠,運行成功后會當前目錄會生成 LabelStudio 目錄:
label-studio 初始化
并彈出瀏覽器打開 label studio 作業界面,創建用戶后即可登錄使用:
作業界面

label studio ml 安裝

label studio ml 是 label studio 的后端配置,其主要提供了一種能夠快速將AI模型封裝為 label studio 可使用的預標記服務(提供模型預測服務),其安裝方法有以下幾種:

  1. GitHub 安裝
git clone https://github.com/heartexlabs/label-studio-ml-backend 
cd label-studio-ml-backend
pip install -U -e .
  1. pip 安裝:
pip install label-studio-ml

仍然建議通過 pip 安裝,GitHub 安裝可能會有依賴問題,安裝完成后使用 label-studio-ml -h 命令檢查是否安裝成功,

前端配置

在 label studio 前端主頁中選擇創建專案:

  1. 專案基本資訊
    創建專案1
  2. 匯入資料
    直接將圖片選中拖入資料框即可,
    創建專案2
  3. 選擇標記模板
    label studio 內置了很多常見的深度學習標記模板,本示例是人臉識別,所以選擇 Object Detection with Bounding Boxes 模板,確定后將模板內自帶的 Airplane 、 Car 標簽洗掉,然后添加自定義的標簽 face (標簽的類別數量可以比后端支持的類別多,也可以更少,但是同類別的標簽名必須一致),
    創建專案3

此時我們已經可以通過 label studio 進行普通的圖片標記作業,如果要使用其提供的輔助預標記功能,則需要進行后續配置,

后端配置

選取后端模型

在 MMDetection 使用示例:從入門到出門 中,我們已經完成了基于 celeba100 資料集的人臉檢測模型的訓練,本文將直接使用其中訓練的結果模型,

后端服務實作

引入后端模型

在根目錄下創建 backend 目錄,并將 MMDetection 使用示例:從入門到出門 中的整個專案檔案復制其中,此時專案目錄為:

.
├── backend
│   └── mmdetection             // 復制的 mmdetection 檔案夾
│        ├── checkpoints
│        ├── completion.json
│        ├── configs
│        ├── conf.yaml
│        ├── detect.py
│        ├── label_studio_backend.py      // 需要自己實作的后端模型
│        ├── mmdet
│        ├── model
│        ├── test.py
│        ├── tools
│        └── train.py
├── dataset
├── export
├── label-studio-ml-backend
├── label_studio.sqlite3
├── media
└── run.bat

創建后端模型

label studio 的后端模型有自己固定的寫法,只要繼承 label_studio_ml.model.LabelStudioMLBase 類并實作其中的介面都可以作為 label studio 的后端服務,在 mmdetection 檔案夾下創建 label_studio_backend.py 檔案,然后在檔案中引入通用配置:

ROOT = os.path.join(os.path.dirname(__file__))
print('=> ROOT = ', ROOT)
# label-studio 啟動的前端服務地址
os.environ['HOSTNAME'] = 'http://localhost:80'
# label-studio 中對應用戶的 API_KEY
os.environ['API_KEY'] = '37edbb42f1b3a73376548ea6c4bc7b3805d63453'
HOSTNAME = get_env('HOSTNAME')
API_KEY = get_env('API_KEY')

print('=> LABEL STUDIO HOSTNAME = ', HOSTNAME)
if not API_KEY:
    print('=> WARNING! API_KEY is not set')

with open(os.path.join(ROOT, "conf.yaml"), errors='ignore') as f:
    conf = yaml.safe_load(f)

這里的 API_KEY 可以在前端的 Account & Settings 中找到,
API_KEY
然后在 label_studio_backend.py 中創建自己預標記模型的類,使其繼承 label_studio_ml.model.LabelStudioMLBase 并實作關鍵方法,不同方法對應不同功能,后面會陸續實作:

class MyModel(LabelStudioMLBase):
    def __init__(self, **kwargs):
        pass
    def predict(self, tasks, **kwargs):
        pass
    def fit(self, completions, batch_size=32, num_epochs=5, **kwargs):
        pass
    def gen_train_data(self, project_id):
        pass

完成其中的 __init__ 方法,以實作模型初始化功能(必須):

    def __init__(self, **kwargs):
        super(MyModel, self).__init__(**kwargs)
        # 按 mmdetection 的方式加載模型及權重
        if self.train_output:
            self.detector = init_detector(conf['config_file'], self.train_output['model_path'], device=conf['device'])
        else:
            self.detector = init_detector(conf['config_file'], conf['checkpoint_file'], device=conf['device'])
        # 獲取后端模型標簽串列
        self.CLASSES = self.detector.CLASSES
        # 前端配置的標簽串列
        self.labels_in_config = set(self.labels_in_config)  
        # 一些專案相關常量
        self.from_name, self.to_name, self.value, self.labels_in_config = get_single_tag_keys(self.parsed_label_config, 'RectangleLabels', 'Image')  # 前端獲取任務屬性

完成其中的 predict 方法,以實作預標記模型的標記功能(必須):

    def predict(self, tasks, **kwargs):
        # 獲取待標記圖片
        images = [get_local_path(task['data'][self.value], hostname=HOSTNAME, access_token=API_KEY) for task in tasks]
        for image_path in images:
            w, h = get_image_size(image_path)
            # 推理演示影像
            img = mmcv.imread(image_path)
            # 以 mmdetection 的方法進行推理
            result = inference_detector(self.detector, img)
            # 手動獲取標記框位置
            bboxes = np.vstack(result)
            # 手動獲取推理結果標簽
            labels = [np.full(bbox.shape[0], i, dtype=np.int32) for i, bbox in enumerate(result)]
            labels = np.concatenate(labels)
            # 推理分數  FCOS演算法結果會多出來兩個分數極低的檢測框,需要將其過濾掉
            scores = bboxes[:, -1]
            score_thr = 0.3
            inds = scores > score_thr
            bboxes = bboxes[inds, :]
            labels = labels[inds]
            results = []  # results需要放在list中再回傳
            for id, bbox in enumerate(bboxes):
                label = self.CLASSES[labels[id]]
                if label not in self.labels_in_config:
                    print(label + ' label not found in project config.')
                    continue
                results.append({
                    'id': str(id),                                      # 必須為 str,否則前端不顯示
                    'from_name': self.from_name,
                    'to_name': self.to_name,
                    'type': 'rectanglelabels',
                    'value': {
                        'rectanglelabels': [label],
                        'x': bbox[0] / w * 100,                         # xy 為左上角坐標點
                        'y': bbox[1] / h * 100,
                        'width': (bbox[2] - bbox[0]) / w * 100,         # width,height 為寬高
                        'height': (bbox[3] - bbox[1]) / h * 100
                    },
                    'score': float(bbox[4] * 100)
                })
            avgs = bboxes[:, -1]
            results = [{'result': results, 'score': np.average(avgs) * 100}]
            return results

完成其中的 gen_train_data 方法,以獲取標記完成的資料用來訓練(非必須,其實 label studio 自帶此類方法,但在實踐程序中有各種問題,所以自己寫了一遍):

    def gen_train_data(self, project_id):
        import zipfile
        import glob
        download_url = f'{HOSTNAME.rstrip("/")}/api/projects/{project_id}/export?export_type=COCO&download_all_tasks=false&download_resources=true'
        response = requests.get(download_url, headers={'Authorization': f'Token {API_KEY}'})
        zip_path = os.path.join(conf['workdir'], "train.zip")
        train_path = os.path.join(conf['workdir'], "train")

        with open(zip_path, 'wb') as file:
            file.write(response.content)  # 通過二進制寫檔案的方式保存獲取的內容
            file.flush()
        f = zipfile.ZipFile(zip_path)  # 創建壓縮包物件
        f.extractall(train_path)  # 壓縮包解壓縮
        f.close()
        os.remove(zip_path)
        if not os.path.exists(os.path.join(train_path, "images", str(project_id))):
            os.makedirs(os.path.join(train_path, "images", str(project_id)))
        for img in glob.glob(os.path.join(train_path, "images", "*.jpg")):
            basename = os.path.basename(img)
            shutil.move(img, os.path.join(train_path, "images", str(project_id), basename))
        return True

完成其中的 fit 方法,以實作預標記模型的自訓練功能(非必須):

    def fit(self, completions, num_epochs=5, **kwargs):
        if completions:     # 使用方法1獲取 project_id
            image_urls, image_labels = [], []
            for completion in completions:
                project_id = completion['project']
                u = completion['data'][self.value]
                image_urls.append(get_local_path(u, hostname=HOSTNAME, access_token=API_KEY))
                image_labels.append(completion['annotations'][0]['result'][0]['value'])
        elif kwargs.get('data'):    # 使用方法2獲取 project_id
            project_id = kwargs['data']['project']['id']
            if not self.parsed_label_config:
                self.load_config(kwargs['data']['project']['label_config'])
        if self.gen_train_data(project_id):
            # 使用 mmdetection 的方法訓練模型
            from tools.mytrain import MyDict, train
            args = MyDict()
            args.config = conf['config_file']
            data_root = os.path.join(conf['workdir'], "train")
            args.cfg_options = {}
            args.cfg_options['data_root'] = data_root
            args.cfg_options['runner'] = dict(type='EpochBasedRunner', max_epochs=num_epochs)
            args.cfg_options['data'] = dict(
                train=dict(img_prefix=data_root, ann_file=data_root + '/result.json'),
                val=dict(img_prefix=data_root, ann_file=data_root + '/result.json'),
                test=dict(img_prefix=data_root, ann_file=data_root + '/result.json'),
            )
            args.cfg_options['load_from'] = conf['checkpoint_file']
            args.work_dir = os.path.join(data_root, "work_dir")
            train(args)
            checkpoint_name = time.strftime("%Y%m%d%H%M%S", time.localtime(time.time())) + ".pth"
            shutil.copy(os.path.join(args.work_dir, "latest.pth"), os.path.join(conf['workdir'], checkpoint_name))
            print("model train complete!")
            # 權重檔案保存至運行環境,將在下次運行 init 初始化時加載
            return {'model_path': os.path.join(conf['workdir'], checkpoint_name)}
        else:
            raise "gen_train_data error"

上述完整代碼如下:

import os
import yaml
import time
import shutil
import requests
import numpy as np
from label_studio_ml.model import LabelStudioMLBase
from label_studio_ml.utils import get_image_size, get_single_tag_keys
from label_studio_tools.core.utils.io import get_local_path
from label_studio_ml.utils import get_env

from mmdet.apis import init_detector, inference_detector
import mmcv

ROOT = os.path.join(os.path.dirname(__file__))
print('=> ROOT = ', ROOT)
os.environ['HOSTNAME'] = 'http://localhost:80'
os.environ['API_KEY'] = '37edbb42f1b3a73376548ea6c4bc7b3805d63453'
HOSTNAME = get_env('HOSTNAME')
API_KEY = get_env('API_KEY')

print('=> LABEL STUDIO HOSTNAME = ', HOSTNAME)
if not API_KEY:
    print('=> WARNING! API_KEY is not set')

with open(os.path.join(ROOT, "conf.yaml"), errors='ignore') as f:
    conf = yaml.safe_load(f)


class MyModel(LabelStudioMLBase):

    def __init__(self, **kwargs):
        super(MyModel, self).__init__(**kwargs)
        # 按 mmdetection 的方式加載模型及權重
        if self.train_output:
            self.detector = init_detector(conf['config_file'], self.train_output['model_path'], device=conf['device'])
        else:
            self.detector = init_detector(conf['config_file'], conf['checkpoint_file'], device=conf['device'])
        # 獲取后端模型標簽串列
        self.CLASSES = self.detector.CLASSES
        # 前端配置的標簽串列
        self.labels_in_config = set(self.labels_in_config)  
        # 一些專案相關常量
        self.from_name, self.to_name, self.value, self.labels_in_config = get_single_tag_keys(self.parsed_label_config, 'RectangleLabels', 'Image')  # 前端獲取任務屬性

    def predict(self, tasks, **kwargs):
        # 獲取待標記圖片
        images = [get_local_path(task['data'][self.value], hostname=HOSTNAME, access_token=API_KEY) for task in tasks]
        for image_path in images:
            w, h = get_image_size(image_path)
            # 推理演示影像
            img = mmcv.imread(image_path)
            # 以 mmdetection 的方法進行推理
            result = inference_detector(self.detector, img)
            # 手動獲取標記框位置
            bboxes = np.vstack(result)
            # 手動獲取推理結果標簽
            labels = [np.full(bbox.shape[0], i, dtype=np.int32) for i, bbox in enumerate(result)]
            labels = np.concatenate(labels)
            # 推理分數  FCOS演算法結果會多出來兩個分數極低的檢測框,需要將其過濾掉
            scores = bboxes[:, -1]
            score_thr = 0.3
            inds = scores > score_thr
            bboxes = bboxes[inds, :]
            labels = labels[inds]
            results = []  # results需要放在list中再回傳
            for id, bbox in enumerate(bboxes):
                label = self.CLASSES[labels[id]]
                if label not in self.labels_in_config:
                    print(label + ' label not found in project config.')
                    continue
                results.append({
                    'id': str(id),                                      # 必須為 str,否則前端不顯示
                    'from_name': self.from_name,
                    'to_name': self.to_name,
                    'type': 'rectanglelabels',
                    'value': {
                        'rectanglelabels': [label],
                        'x': bbox[0] / w * 100,                         # xy 為左上角坐標點
                        'y': bbox[1] / h * 100,
                        'width': (bbox[2] - bbox[0]) / w * 100,         # width,height 為寬高
                        'height': (bbox[3] - bbox[1]) / h * 100
                    },
                    'score': float(bbox[4] * 100)
                })
            avgs = bboxes[:, -1]
            results = [{'result': results, 'score': np.average(avgs) * 100}]
            return results

    def fit(self, completions, num_epochs=5, **kwargs):
        if completions:     # 使用方法1獲取 project_id
            image_urls, image_labels = [], []
            for completion in completions:
                project_id = completion['project']
                u = completion['data'][self.value]
                image_urls.append(get_local_path(u, hostname=HOSTNAME, access_token=API_KEY))
                image_labels.append(completion['annotations'][0]['result'][0]['value'])
        elif kwargs.get('data'):    # 使用方法2獲取 project_id
            project_id = kwargs['data']['project']['id']
            if not self.parsed_label_config:
                self.load_config(kwargs['data']['project']['label_config'])
        if self.gen_train_data(project_id):
            # 使用 mmdetection 的方法訓練模型
            from tools.mytrain import MyDict, train
            args = MyDict()
            args.config = conf['config_file']
            data_root = os.path.join(conf['workdir'], "train")
            args.cfg_options = {}
            args.cfg_options['data_root'] = data_root
            args.cfg_options['runner'] = dict(type='EpochBasedRunner', max_epochs=num_epochs)
            args.cfg_options['data'] = dict(
                train=dict(img_prefix=data_root, ann_file=data_root + '/result.json'),
                val=dict(img_prefix=data_root, ann_file=data_root + '/result.json'),
                test=dict(img_prefix=data_root, ann_file=data_root + '/result.json'),
            )
            args.cfg_options['load_from'] = conf['checkpoint_file']
            args.work_dir = os.path.join(data_root, "work_dir")
            train(args)
            checkpoint_name = time.strftime("%Y%m%d%H%M%S", time.localtime(time.time())) + ".pth"
            shutil.copy(os.path.join(args.work_dir, "latest.pth"), os.path.join(conf['workdir'], checkpoint_name))
            print("model train complete!")
            # 權重檔案保存至運行環境,將在下次運行 init 初始化時加載
            return {'model_path': os.path.join(conf['workdir'], checkpoint_name)}
        else:
            raise "gen_train_data error"

    def gen_train_data(self, project_id):
        import zipfile
        import glob
        download_url = f'{HOSTNAME.rstrip("/")}/api/projects/{project_id}/export?export_type=COCO&download_all_tasks=false&download_resources=true'
        response = requests.get(download_url, headers={'Authorization': f'Token {API_KEY}'})
        zip_path = os.path.join(conf['workdir'], "train.zip")
        train_path = os.path.join(conf['workdir'], "train")

        with open(zip_path, 'wb') as file:
            file.write(response.content)  # 通過二進制寫檔案的方式保存獲取的內容
            file.flush()
        f = zipfile.ZipFile(zip_path)  # 創建壓縮包物件
        f.extractall(train_path)  # 壓縮包解壓縮
        f.close()
        os.remove(zip_path)
        if not os.path.exists(os.path.join(train_path, "images", str(project_id))):
            os.makedirs(os.path.join(train_path, "images", str(project_id)))
        for img in glob.glob(os.path.join(train_path, "images", "*.jpg")):
            basename = os.path.basename(img)
            shutil.move(img, os.path.join(train_path, "images", str(project_id), basename))
        return True

啟動后端服務

以下命令為 window 腳本,皆在 backend 根目錄下執行,

  1. 根據后端模型生成服務代碼
label-studio-ml init model --script mmdetection/label_studio_backend.py --force

label-studio-ml init 命令提供了一種根據后端模型自動生成后端服務代碼的功能, model 為輸出目錄, --script 指定后端模型路徑, --force 表示覆寫生成,該命令執行成功后會在 backend 目錄下生成 model 目錄,
2. 復制 mmdetection 依賴檔案
由于 label-studio-ml 生成的后端服務代碼只包含基本的 label_studio_backend.py 中的內容,而我們所用的 mmdetection 框架的執行需要大量額外的依賴,所以需要手動將這些依賴復制到生成的 model 目錄中,使用以下命令完成自動復制依賴:

md .\model\mmdet
md .\model\model
md .\model\configs
md .\model\checkpoints
md .\model\tools
md .\model\workdir
xcopy .\mmdetection\mmdet .\model\mmdet /S /Y /Q
xcopy .\mmdetection\model .\model\model /S /Y /Q
xcopy .\mmdetection\configs .\model\configs  /S /Y /Q
xcopy .\mmdetection\checkpoints .\model\checkpoints  /S /Y /Q
xcopy .\mmdetection\tools .\model\tools  /S /Y /Q
copy .\mmdetection\conf.yaml .\model\conf.yaml
  1. 啟動后端服務
label-studio-ml start model --host 0.0.0.0 -p 8888

啟動成功后效果如下:
啟動后端服務

前端自動標注

前面我們已經能夠從 label studio 前端正常手動標注圖片,要想實作自動標注,則需要在前端引入后端服務,在我們創建的專案中依次選擇 Settings ->
Machine Learning -> Add model ,然后輸入后端地址 http://10.100.143.125:8888/ 點擊保存(此地址為命令列列印地址,而非 http://127.0.0.1:8888/ ):
Add model
此時我們從前端專案中打開待標記圖片,前端會自動請求后端對其進行標記(呼叫后端的 predict 方法),等待片刻后即可看見預標記結果,我們只需要大致核對無誤后點擊 submit 即可:
前端自動標注
如果覺得每次打開圖片都需要等待片刻才會收到后端預測結果比較費時,可以在 Settings -> Machine Learning 設定中選擇打開 Retrieve predictions when loading a task automatically ,此后前端會在我們每次打開專案時自動對所有任務進行自動預測,基本能夠做到無等待:
Retrieve predictions when loading a task automatically

后端自動訓練

現在所有的圖片都已經有了與標注資訊,我們先檢查所有圖片,檢查并改進所有標注資訊然后點擊 submit 提交:
提交標注
在 Settings -> Machine Learning 中點擊后端服務的 Start Training 按鈕,即可呼叫后端模型使用已標記資訊進行訓練:
Start Training
該操作會呼叫后端模型的 fit 方法對模型進行訓練,可以在后端命令列界面看見訓練程序,訓練完成后的所有新資料集都會使用新的模型進行預測:
自動訓練
也可以 Settings -> Machine Learning 中允許模型自動訓練,但訓練頻率過高會影響程式效率,

部分常見問題

Q: 一種訪問權限不允許的方式做了一個訪問套接字的嘗試,
A: label-studio-ml start 啟動時指定埠 -p 8888

Q: Can't connect to ML backend http://127.0.0.1:8888/, health check failed. Make sure it is up and your firewall is properly configured.
A: label-studio-ml start 啟動后會列印一個監聽地址,label studio 前端添加該地址而非 http://127.0.0.1:8888/ ,

Q: FileNotFoundError: Can't resolve url, neither hostname or project_dir passed: /data/upload/1/db8f065a-000001.jpg
A: 介面回傳的是專案的相對地址,無法通過該地址直接讀取到圖片原件,需要配合 get_local_path 函式使用,

Q: UnicodeEncodeError: 'gbk' codec can't encode character '\xa0' in position 2: illegal multibyte sequence
A: 修改 C:\Users\Fantasy.conda\envs\labelstudio\lib\json_init_.py#line 179 為:

    for chunk in iterable:
        fp.write(chunk.replace(u'\xa0', u''))

參考


  1. Cai Yichao. label_studio自動預標注功能. CSDN. [2022-01-19] ??

轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/538549.html

標籤:其他

上一篇:邊玩邊學!互動式可視化圖解!快收藏這18個機器學習和資料科學網站!?

下一篇:PyTorch Geometric Temporal 介紹 —— 資料結構和RGCN的概念

標籤雲
其他(157675) Python(38076) JavaScript(25376) Java(17977) C(15215) 區塊鏈(8255) C#(7972) AI(7469) 爪哇(7425) MySQL(7132) html(6777) 基礎類(6313) sql(6102) 熊猫(6058) PHP(5869) 数组(5741) R(5409) Linux(5327) 反应(5209) 腳本語言(PerlPython)(5129) 非技術區(4971) Android(4554) 数据框(4311) css(4259) 节点.js(4032) C語言(3288) json(3245) 列表(3129) 扑(3119) C++語言(3117) 安卓(2998) 打字稿(2995) VBA(2789) Java相關(2746) 疑難問題(2699) 细绳(2522) 單片機工控(2479) iOS(2429) ASP.NET(2402) MongoDB(2323) 麻木的(2285) 正则表达式(2254) 字典(2211) 循环(2198) 迅速(2185) 擅长(2169) 镖(2155) 功能(1967) .NET技术(1958) Web開發(1951) python-3.x(1918) HtmlCss(1915) 弹簧靴(1913) C++(1909) xml(1889) PostgreSQL(1872) .NETCore(1853) 谷歌表格(1846) Unity3D(1843) for循环(1842)

熱門瀏覽
  • 網閘典型架構簡述

    網閘架構一般分為兩種:三主機的三系統架構網閘和雙主機的2+1架構網閘。 三主機架構分別為內端機、外端機和仲裁機。三機無論從軟體和硬體上均各自獨立。首先從硬體上來看,三機都用各自獨立的主板、記憶體及存盤設備。從軟體上來看,三機有各自獨立的作業系統。這樣能達到完全的三機獨立。對于“2+1”系統,“2”分為 ......

    uj5u.com 2020-09-10 02:00:44 more
  • 如何從xshell上傳檔案到centos linux虛擬機里

    如何從xshell上傳檔案到centos linux虛擬機里及:虛擬機CentOs下執行 yum -y install lrzsz命令,出現錯誤:鏡像無法找到軟體包 前言 一、安裝lrzsz步驟 二、上傳檔案 三、遇到的問題及解決方案 總結 前言 提示:其實很簡單,往虛擬機上安裝一個上傳檔案的工具 ......

    uj5u.com 2020-09-10 02:00:47 more
  • 一、SQLMAP入門

    一、SQLMAP入門 1、判斷是否存在注入 sqlmap.py -u 網址/id=1 id=1不可缺少。當注入點后面的引數大于兩個時。需要加雙引號, sqlmap.py -u "網址/id=1&uid=1" 2、判斷文本中的請求是否存在注入 從文本中加載http請求,SQLMAP可以從一個文本檔案中 ......

    uj5u.com 2020-09-10 02:00:50 more
  • Metasploit 簡單使用教程

    metasploit 簡單使用教程 浩先生, 2020-08-28 16:18:25 分類專欄: kail 網路安全 linux 文章標簽: linux資訊安全 編輯 著作權 metasploit 使用教程 前言 一、Metasploit是什么? 二、準備作業 三、具體步驟 前言 Msfconsole ......

    uj5u.com 2020-09-10 02:00:53 more
  • 游戲逆向之驅動層與用戶層通訊

    驅動層代碼: #pragma once #include <ntifs.h> #define add_code CTL_CODE(FILE_DEVICE_UNKNOWN,0x800,METHOD_BUFFERED,FILE_ANY_ACCESS) /* 更多游戲逆向視頻www.yxfzedu.com ......

    uj5u.com 2020-09-10 02:00:56 more
  • 北斗電力時鐘(北斗授時服務器)讓網路資料更精準

    北斗電力時鐘(北斗授時服務器)讓網路資料更精準 北斗電力時鐘(北斗授時服務器)讓網路資料更精準 京準電子科技官微——ahjzsz 近幾年,資訊技術的得了快速發展,互聯網在逐漸普及,其在人們生活和生產中都得到了廣泛應用,并且取得了不錯的應用效果。計算機網路資訊在電力系統中的應用,一方面使電力系統的運行 ......

    uj5u.com 2020-09-10 02:01:03 more
  • 【CTF】CTFHub 技能樹 彩蛋 writeup

    ?碎碎念 CTFHub:https://www.ctfhub.com/ 筆者入門CTF時時剛開始刷的是bugku的舊平臺,后來才有了CTFHub。 感覺不論是網頁UI設計,還是題目質量,賽事跟蹤,工具軟體都做得很不錯。 而且因為獨到的金幣制度的確讓人有一種想去刷題賺金幣的感覺。 個人還是非常喜歡這個 ......

    uj5u.com 2020-09-10 02:04:05 more
  • 02windows基礎操作

    我學到了一下幾點 Windows系統目錄結構與滲透的作用 常見Windows的服務詳解 Windows埠詳解 常用的Windows注冊表詳解 hacker DOS命令詳解(net user / type /md /rd/ dir /cd /net use copy、批處理 等) 利用dos命令制作 ......

    uj5u.com 2020-09-10 02:04:18 more
  • 03.Linux基礎操作

    我學到了以下幾點 01Linux系統介紹02系統安裝,密碼啊破解03Linux常用命令04LAMP 01LINUX windows: win03 8 12 16 19 配置不繁瑣 Linux:redhat,centos(紅帽社區版),Ubuntu server,suse unix:金融機構,證券,銀 ......

    uj5u.com 2020-09-10 02:04:30 more
  • 05HTML

    01HTML介紹 02頭部標簽講解03基礎標簽講解04表單標簽講解 HTML前段語言 js1.了解代碼2.根據代碼 懂得挖掘漏洞 (POST注入/XSS漏洞上傳)3.黑帽seo 白帽seo 客戶網站被黑帽植入劫持代碼如何處理4.熟悉html表單 <html><head><title>TDK標題,描述 ......

    uj5u.com 2020-09-10 02:04:36 more
最新发布
  • 2023年最新微信小程式抓包教程

    01 開門見山 隔一個月發一篇文章,不過分。 首先回顧一下《微信系結手機號資料庫被脫庫事件》,我也是第一時間得知了這個訊息,然后跟蹤了整件事情的經過。下面是這起事件的相關截圖以及近日流出的一萬條資料樣本: 個人認為這件事也沒什么,還不如關注一下之前45億快遞資料查詢渠道疑似在近日復活的訊息。 訊息是 ......

    uj5u.com 2023-04-20 08:48:24 more
  • web3 產品介紹:metamask 錢包 使用最多的瀏覽器插件錢包

    Metamask錢包是一種基于區塊鏈技術的數字貨幣錢包,它允許用戶在安全、便捷的環境下管理自己的加密資產。Metamask錢包是以太坊生態系統中最流行的錢包之一,它具有易于使用、安全性高和功能強大等優點。 本文將詳細介紹Metamask錢包的功能和使用方法。 一、 Metamask錢包的功能 數字資 ......

    uj5u.com 2023-04-20 08:47:46 more
  • vulnhub_Earth

    前言 靶機地址->>>vulnhub_Earth 攻擊機ip:192.168.20.121 靶機ip:192.168.20.122 參考文章 https://www.cnblogs.com/Jing-X/archive/2022/04/03/16097695.html https://www.cnb ......

    uj5u.com 2023-04-20 07:46:20 more
  • 從4k到42k,軟體測驗工程師的漲薪史,給我看哭了

    清明節一過,盲猜大家已經無心上班,在數著日子準備過五一,但一想到銀行卡里的余額……瞬間心情就不美麗了。最近,2023年高校畢業生就業調查顯示,本科畢業月平均起薪為5825元。調查一出,便有很多同學表示自己又被平均了。看著這一資料,不免讓人想到前不久中國青年報的一項調查:近六成大學生認為畢業10年內會 ......

    uj5u.com 2023-04-20 07:44:00 more
  • 最新版本 Stable Diffusion 開源 AI 繪畫工具之中文自動提詞篇

    🎈 標簽生成器 由于輸入正向提示詞 prompt 和反向提示詞 negative prompt 都是使用英文,所以對學習母語的我們非常不友好 使用網址:https://tinygeeker.github.io/p/ai-prompt-generator 這個網址是為了讓大家在使用 AI 繪畫的時候 ......

    uj5u.com 2023-04-20 07:43:36 more
  • 漫談前端自動化測驗演進之路及測驗工具分析

    隨著前端技術的不斷發展和應用程式的日益復雜,前端自動化測驗也在不斷演進。隨著 Web 應用程式變得越來越復雜,自動化測驗的需求也越來越高。如今,自動化測驗已經成為 Web 應用程式開發程序中不可或缺的一部分,它們可以幫助開發人員更快地發現和修復錯誤,提高應用程式的性能和可靠性。 ......

    uj5u.com 2023-04-20 07:43:16 more
  • CANN開發實踐:4個DVPP記憶體問題的典型案例解讀

    摘要:由于DVPP媒體資料處理功能對存放輸入、輸出資料的記憶體有更高的要求(例如,記憶體首地址128位元組對齊),因此需呼叫專用的記憶體申請介面,那么本期就分享幾個關于DVPP記憶體問題的典型案例,并給出原因分析及解決方法。 本文分享自華為云社區《FAQ_DVPP記憶體問題案例》,作者:昇騰CANN。 DVPP ......

    uj5u.com 2023-04-20 07:43:03 more
  • msf學習

    msf學習 以kali自帶的msf為例 一、msf核心模塊與功能 msf模塊都放在/usr/share/metasploit-framework/modules目錄下 1、auxiliary 輔助模塊,輔助滲透(埠掃描、登錄密碼爆破、漏洞驗證等) 2、encoders 編碼器模塊,主要包含各種編碼 ......

    uj5u.com 2023-04-20 07:42:59 more
  • Halcon軟體安裝與界面簡介

    1. 下載Halcon17版本到到本地 2. 雙擊安裝包后 3. 步驟如下 1.2 Halcon軟體安裝 界面分為四大塊 1. Halcon的五個助手 1) 影像采集助手:與相機連接,設定相機引數,采集影像 2) 標定助手:九點標定或是其它的標定,生成標定檔案及內參外參,可以將像素單位轉換為長度單位 ......

    uj5u.com 2023-04-20 07:42:17 more
  • 在MacOS下使用Unity3D開發游戲

    第一次發博客,先發一下我的游戲開發環境吧。 去年2月份買了一臺MacBookPro2021 M1pro(以下簡稱mbp),這一年來一直在用mbp開發游戲。我大致分享一下我的開發工具以及使用體驗。 1、Unity 官網鏈接: https://unity.cn/releases 我一般使用的Apple ......

    uj5u.com 2023-04-20 07:40:19 more