主頁 >  其他 > MMDetection 使用示例:從入門到出門

MMDetection 使用示例:從入門到出門

2022-08-05 07:43:17 其他

前言

最近對目標識別感興趣,想做一些有趣目標識別專案自己玩耍,本來選擇的是 YOLOV5 的,但無奈自己使用 YOLOV5 環境訓練模型時,不管訓練多少次 mAP 指標總是為 0,而其它 pytorch 專案卻能正常運行,嘗試解決無果后發現另一個更好用的目標識別庫——MMDetection ,最終實作了自己的需求,本文首先介紹了 MMDetection 庫在 Windows 11 下的安裝方式,及可能遇到的問題和解決方法;然后說明了其自帶的單圖片檢測、視頻檢測、攝像頭檢測工具的使用方法,并在此之上擴展了一個同時包含上述功能并且能夠批量檢測圖片的 Python 代碼;最后以資料集 CelebA 資料集為例,詳細記錄了使用 MMDetection 訓練私有資料集的方法,

安裝說明

基本環境

軟體 版本
Windows 11
CUDA 11.6
conda 4.12.0
python 3.9.12
torch 1.11.0+cu113
torchaudio 0.11.0+cu113
torchvision 0.12.0+cu113
mmcv-full 1.5.1
mmdet 2.24.1

安裝 MMCV

MMDetection 的運行依賴 MMCV ,它是一個面向計算機視覺的基礎庫,其中支持了很多開源工具,如影像分類工具、目標檢測工具、語意分割工具、姿態估計工具等常用工具, MMDetection 的版本跟 MMCV 的版本依賴關系如下表:

MMDetection 版本 MMCV 版本
master mmcv-full>=1.3.17, <1.6.0
2.25.0 mmcv-full>=1.3.17, <1.6.0
2.24.1 mmcv-full>=1.3.17, <1.6.0
2.24.0 mmcv-full>=1.3.17, <1.6.0
2.23.0 mmcv-full>=1.3.17, <1.5.0
2.22.0 mmcv-full>=1.3.17, <1.5.0
2.21.0 mmcv-full>=1.3.17, <1.5.0

一般,MMCV 可以通過 pip 直接安裝:

pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/{cu_version}/{torch_version}/index.html

具體的只需要將鏈接中的 {cu_version}{torch_version} 根據自身需求替換成實際的版本號即可,例如:

pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cu111/torch1.9.0/index.html

偶有例外情況,比如本文中使用的 CUDA 11.6torch 1.11.0+cu113 就不能直接帶入其中,此時可嘗試逐漸降低所裝 MMCV 的 CUDA 或 torch 版本號,然后直接在瀏覽器中打開鏈接觀察是否存在資料以確定版本匹配,對于本文環境則使用以下安裝鏈接:

pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cu115/torch1.11.0/index.html

安裝 MMDetection

可直接在使用 pip 命令安裝 MMDetection :

pip install mmdet

也可以下載 git 倉庫原始碼本地編譯安裝:

git clone https://github.com/open-mmlab/mmdetection.git
cd mmdetection
pip install -r requirements/build.txt
pip install -v -e .

我在兩臺電腦上分別安裝 MMDetection 環境,第一臺通過 pip 可以完全正常安裝,第二臺安裝程序中出現了幾個錯誤:

  1. 缺少 Microsoft Visual C++
    error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/ 
    
    此時只需要根據錯誤提示鏈接下載官方構建工具即可,運行工具后選擇 使用 C++ 的桌面開發 它會推薦4個構建工具,建議不要試圖為了節省硬碟容量而更改,最終安裝的內容如下:
    使用 C++ 的桌面開發
    如果因為網速不好無法下載而導致安裝失敗,可自行搜索離線安裝包進行安裝,
  2. 缺少 pycocotools
    No module named ‘pycocotools’
    
    這個錯誤卡了很久,試過本地編譯、降低版本、pip 安裝 pycocotools 、 conda 安裝 pycocotools 等各種方式想解決這個問題都失敗,最后根據 win10python3.9安裝pycocotools 成功安裝 ,

簡單使用

使用前,先將 MMDetection 原始碼拷貝到本地,并在其根目錄打開命令列激活 mmdet 環境,如無特殊說明,本文所有命令皆在此目錄此環境下運行:

git clone [email protected]:open-mmlab/mmdetection.git

其中主要目錄介紹如下:

  • configs :模型網路結構配置目錄,基本所有主流模型都在里面被定義,其中每個模型目錄下的 README.md 包含本模型的預訓練模型
  • demo :官方識別示例,包含圖片識別、視頻識別、攝像頭識別等
  • docker : docker 環境檔案
  • docs :相關說明檔案
  • mmdet :MMDetection 的主要原始碼檔案,包含資料處理、模型加載、API 介面等
  • tests :包含各種場景下的使用示例
  • tools :包含各種有用的工具——訓練代碼、測驗代碼、資料集分析、日志分析等

識別單張圖片

識別單張圖片的代碼是 demo 目錄下的 image_demo.py ,打開原始碼可發現其執行需要指定四個引數:

  • img :待識別圖片地址
  • config :所用模型組態檔地址,即專案根目錄下的 configs 目錄對應地址
  • checkpoint :與 config 引數對應的訓練好的模型檔案
  • --out-file :輸出檔案地址

在此我們選擇使用的模型組態檔是 configs/faster_rcnn/faster_rcnn_r50_fpn_1x_coco.py (MMDetection 的名稱規范為 [model]_(model setting)_[backbone]_[neck]_(norm setting)_(misc)_(gpu x batch)_[schedule]_[dataset].py),在具體使用前,還需要下載該模型對應訓練好的模型檔案,在模型組態檔對應目錄 faster_rcnn 下的 README.md 檔案中可找到預訓練模型的下載地址:
預訓練模型的下載地址
將預訓練模型訓練好后放入專案根目錄的 checkpoints 目錄下,然后就可以開始識別具體圖片了,以官方圖片為例:
demo jpg
在根目錄下運行以下命令:

python demo/image_demo.py --out-file demo-result.jpg demo/demo.jpg configs/faster_rcnn/faster_rcnn_r50_fpn_1x_coco.py checkpoints/faster_rcnn_r50_fpn_1x_coco_20200130-047c8118.pth

隨后可在根目錄下找到識別輸出圖片 demo-result.jpg
demo-result

識別視頻檔案

識別視頻檔案的代碼是 demo 目錄下的 video_demo.py ,打開原始碼可發現其執行需要指定四個引數:

  • video :待識別視頻檔案地址
  • config :所用模型組態檔地址,即專案根目錄下的 configs 目錄對應地址
  • checkpoint :與 config 引數對應的訓練好的模型檔案
  • --out :輸出檔案地址
    我們仍然使用上節指定的模型組態檔和模型檔案,輸入視頻為 demo/demo.mp4 ,原視頻如下:
    原視頻
    在根目錄下運行以下命令:
python demo/video_demo.py --out demo-result.mp4 demo/demo.mp4 configs/faster_rcnn/faster_rcnn_r50_fpn_1x_coco.py checkpoints/faster_rcnn_r50_fpn_1x_coco_20200130-047c8118.pth

隨后可在根目錄下找到識別輸出視頻 demo-result.mp4
輸出視頻

識別攝像頭

識別視頻檔案的代碼是 demo 目錄下的 webcam_demo.py ,打開原始碼可發現其執行需要指定四個引數:

  • config :所用模型組態檔地址,即專案根目錄下的 configs 目錄對應地址
  • checkpoint :與 config 引數對應的訓練好的模型檔案
    在根目錄下運行以下命令:
python demo/webcam_demo.py configs/faster_rcnn/faster_rcnn_r50_fpn_1x_coco.py checkpoints/faster_rcnn_r50_fpn_1x_coco_20200130-047c8118.pth

隨后程式會一直呼叫電腦可用攝像頭進行拍照識別,一個中間程序截圖為:
識別攝像頭

識別整合/批量圖片

MMDetection 自帶的 Demo 是不支持檔案夾批量圖片識別的,而且常用的視頻識別和圖片識別分開且引數不一致使用起來也比較麻煩,因此本小節嘗試將視頻識別和圖片識別進行合并,并使其支持批量圖片識別:

  1. 格式化引數:
def parse_args():
    parser = ArgumentParser()
    parser.add_argument('source', help='source')
    parser.add_argument('config', help='Config file')
    parser.add_argument('checkpoint', help='Checkpoint file')
    parser.add_argument('--out_path', default=None, help='Path to output')
    parser.add_argument('--device', default='cuda:0', help='Device used for inference')
    parser.add_argument('--palette', default='coco', choices=['coco', 'voc', 'citys', 'random'], help='Color palette used for visualization')
    parser.add_argument('--score-thr', type=float, default=0.3, help='bbox score threshold')
    args = parser.parse_args()
    return args
  1. 單圖片識別:
def single_image(args):
    model = init_detector(args.config, args.checkpoint, device=args.device)
    basename = os.path.basename(args.source)
    result = inference_detector(model, args.source)
    model.show_result(args.source, result, args.score_thr, show=False, win_name=basename, bbox_color=args.palette, text_color=args.palette, mask_color=None, out_file=os.path.join(args.out_path, "detect_" + basename))
  1. 多圖片識別:
def multi_image(args):
    model = init_detector(args.config, args.checkpoint, device=args.device)
    imgs = glob.glob(os.path.join(args.source, "*.jpg"))
    with alive_bar(len(imgs), ctrl_c=False, title=f'Detecting') as bar:
        for img in imgs:
            basename = os.path.basename(img)
            result = inference_detector(model, img)
            model.show_result(img, result, args.score_thr, show=False, win_name=basename, bbox_color=args.palette, text_color=args.palette, mask_color=None, out_file=os.path.join(args.out_path, "detect_" + basename))
            bar()
  1. 單視頻識別:
def single_video(args):
    import matplotlib
    matplotlib.use('agg')
    model = init_detector(args.config, args.checkpoint, device=args.device)
    video_reader = mmcv.VideoReader(args.source)
    video_writer = None

    basename = os.path.basename(args.source)
    fourcc = cv2.VideoWriter_fourcc(*'mp4v')
    video_writer = cv2.VideoWriter(os.path.join(args.out_path, "detect_" + basename), fourcc, video_reader.fps, (video_reader.width, video_reader.height))

    for frame in mmcv.track_iter_progress(video_reader):
        result = inference_detector(model, frame)
        frame = model.show_result(frame, result, score_thr=args.score_thr, bbox_color=args.palette, text_color=args.palette, mask_color=None)
        video_writer.write(frame)

    if video_writer:
        video_writer.release()
    cv2.destroyAllWindows()
  1. 入口函式:
def main(args):
    if os.path.isdir(args.source):
        multi_image(args)
    elif args.source.endswith(('.bmp', '.dib', '.png', '.jpg', '.jpeg', '.pbm', '.pgm', '.ppm', '.tif', '.tiff')):
        single_image(args)
    elif args.source.endswith(".mp4", ".avi", ".wmv"):
        single_video(args)

完整代碼為:

# Copyright (c) OpenMMLab. All rights reserved.
import os
import cv2
import mmcv
import glob
from alive_progress import alive_bar
from argparse import ArgumentParser

from mmdet.apis import (inference_detector, init_detector, show_result_pyplot)


def parse_args():
    parser = ArgumentParser()
    parser.add_argument('source', help='source')
    parser.add_argument('config', help='Config file')
    parser.add_argument('checkpoint', help='Checkpoint file')
    parser.add_argument('--out_path', default=None, help='Path to output')
    parser.add_argument('--device', default='cuda:0', help='Device used for inference')
    parser.add_argument('--palette', default='coco', choices=['coco', 'voc', 'citys', 'random'], help='Color palette used for visualization')
    parser.add_argument('--score-thr', type=float, default=0.3, help='bbox score threshold')
    args = parser.parse_args()
    return args


def single_image(args):
    model = init_detector(args.config, args.checkpoint, device=args.device)
    basename = os.path.basename(args.source)
    result = inference_detector(model, args.source)
    model.show_result(args.source, result, args.score_thr, show=False, win_name=basename, bbox_color=args.palette, text_color=args.palette, mask_color=None, out_file=os.path.join(args.out_path, "detect_" + basename))


def multi_image(args):
    model = init_detector(args.config, args.checkpoint, device=args.device)
    imgs = glob.glob(os.path.join(args.source, "*.jpg"))
    with alive_bar(len(imgs), ctrl_c=False, title=f'Detecting') as bar:
        for img in imgs:
            basename = os.path.basename(img)
            result = inference_detector(model, img)
            model.show_result(img, result, args.score_thr, show=False, win_name=basename, bbox_color=args.palette, text_color=args.palette, mask_color=None, out_file=os.path.join(args.out_path, "detect_" + basename))
            bar()


def single_video(args):
    import matplotlib
    matplotlib.use('agg')
    model = init_detector(args.config, args.checkpoint, device=args.device)
    video_reader = mmcv.VideoReader(args.source)
    video_writer = None

    basename = os.path.basename(args.source)
    fourcc = cv2.VideoWriter_fourcc(*'mp4v')
    video_writer = cv2.VideoWriter(os.path.join(args.out_path, "detect_" + basename), fourcc, video_reader.fps, (video_reader.width, video_reader.height))

    for frame in mmcv.track_iter_progress(video_reader):
        result = inference_detector(model, frame)
        frame = model.show_result(frame, result, score_thr=args.score_thr, bbox_color=args.palette, text_color=args.palette, mask_color=None)
        video_writer.write(frame)

    if video_writer:
        video_writer.release()
    cv2.destroyAllWindows()


def main(args):
    if os.path.isdir(args.source):
        multi_image(args)
    elif args.source.endswith(('.bmp', '.dib', '.png', '.jpg', '.jpeg', '.pbm', '.pgm', '.ppm', '.tif', '.tiff')):
        single_image(args)
    elif args.source.endswith(".mp4", ".avi", ".wmv"):
        single_video(args)


if __name__ == '__main__':
    args = parse_args()
    main(args)

將完整代碼保存至專案根目錄下的 detect.py 檔案中,一個批量識別 demo 下的所有圖片,并將結果保存至 demo-result 下的示例為:

python detect.py --out_path demo-result demo/ configs/faster_rcnn/faster_rcnn_r50_fpn_1x_coco.py checkpoints/faster_rcnn_r50_fpn_1x_coco_20200130-047c8118.pth

由于 demo 目錄下只有一張圖片,所以運行很快結束:
批量識別

訓練私有資料

資料集介紹

CelebA 是 CelebFaces Attribute 的縮寫,意即名人人臉屬性資料集,其包含 10177 個名人身份的 202599 張人臉圖片,每張圖片都做好了特征標記,包含人臉 bbox 標注框、 5 個人臉特征點坐標以及 40 個屬性標記, CelebA 由香港中文大學開放提供,廣泛用于人臉相關的計算機視覺訓練任務,可用于人臉屬性標識訓練、人臉檢測訓練以及 landmark 標記等,官方網址:Large-scale CelebFaces Attributes (CelebA) Dataset ,通過官網下載的 CelebA 資料集目錄結構如下:
CelebA 資料集目錄結構
其中各檔案目錄介紹如下:

  • img_align_celeba :經過人臉對齊和裁剪了的影像
  • img_celeba :原始“野生”人臉影像,從網路爬取未有做任何裁剪縮放操作的人臉影像
  • labels : 標簽檔案
    • identity_CelebA.txt :每張圖片對應的身份編號資訊
    • list_attr_celeba.txt :40 個屬性標簽檔案,第一行為影像張數,第二行為屬性名,有該屬性則標記為1,否則標記為-1
    • list_bbox_celeba.txt :人臉標注框坐標注釋檔案,包含每一張圖片對應的 bbox 起點坐標及其寬高
    • list_eval_partition.txt :用于劃分為 trainingvalidationtesting 等資料集的標簽檔案,標簽0對應 training ,標簽1對應 validation ,標簽2對應 testing
    • list_landmarks_align_celeba.txt :人臉對齊后的5個特征點landmark坐標注釋檔案

資料集預處理

CelebA 包含大量資料,本節我們只想討論 MMDetection 自定義資料集的訓練方法而非真的要訓練出一個效果極好的影像分類識別模型,因此需要對資料集進行簡化,大致流程如下:

  1. 創建訓練資料檔案夾 celeba100
  2. CelebA/img_celeba 中前100張圖片復制到 celeba100/images 目錄下
  3. CelebA/labels/list_bbox_celeba.txt 復制到 celeba100/list_bbox_celeba.txt
  4. 創建 celeba100/classes.txt 檔案并寫入一行資料 face ,此時訓練集目錄如下:
    預處理前
  5. 用代碼將 celeba100/list_bbox_celeba.txt 中前100行標簽格式轉為 COCO 格式存放于 celeba100/annotations/label.json

list_bbox_celeba.txt 轉為 COCO 代碼如下:

import os
from PIL import Image
import json
basepath = r"C:\CommonProject\celeba100"
imagepath = os.path.join(basepath, "images")
annpath = os.path.join(basepath, "annotations")
annfile = os.path.join(annpath, "label.json")
labeltxt = os.path.join(basepath, "list_bbox_celeba.txt")
calssestxt = os.path.join(basepath, "classes.txt")
def get_image_size(infile):
    im = Image.open(infile)
    return im.size

label = {}
with open(calssestxt, 'r+') as f:
    classes = []
    lines = f.readlines()
    for i, line in enumerate(lines):
        c = {}
        c['id'] = i
        c['name'] = line
        c['supercategory'] = "mark"
        classes.append(c)
label['categories'] = classes

images = []
annotations = []
with open(labeltxt, 'r+') as f:
    lines = f.readlines()[:101]
    for i, line in enumerate(lines):
        d = line.split()
        imgpath = os.path.join(imagepath, d[0])
        img = {}
        img_size = get_image_size(imgpath)
        img['id'] = i
        img['file_name'] = d[0]
        img['width'] = img_size[0]
        img['height'] = img_size[1]
        images.append(img)
        ann = {}
        ann['id'] = i
        ann['image_id'] = i
        ann['category_id'] = 0
        ann['iscrowd'] = 0
        ann['bbox'] = [int(t) for t in d[1:]]
        ann['area'] = (ann['bbox'][2] - ann['bbox'][0]) * (ann['bbox'][3] - ann['bbox'][1])
        annotations.append(ann)
        
label['images'] = images
label['annotations'] = annotations

with open(annfile, "w+") as f:
    json.dump(label, f)

配置 MMDetection

上節我們已經整理出 MMDetection 能直接使用的小資料集,現在需要撰寫我們訓練所使用的模型組態檔,在 mmdetection 根目錄下創建一個 celeba 檔案夾,并在其下創建模型組態檔 celeba.py ,寫入內容如下:

_base_ = '../configs/fcos/fcos_r101_caffe_fpn_gn-head_mstrain_640-800_2x_coco.py'

import os
model = dict(bbox_head=dict(num_classes=1))

dataset_type = 'COCODataset'
classes = ('face', )
data_root = "C:/CommonProject/celeba100"
data = https://www.cnblogs.com/ifantasy/p/dict(
    samples_per_gpu=2,
    workers_per_gpu=0,
    train=dict(img_prefix=data_root +'/images', classes=classes, ann_file=data_root + '/annotations/label.json'),
    val=dict(img_prefix=data_root + '/images', classes=classes, ann_file=data_root + '/annotations/label.json'),
    test=dict(img_prefix=data_root + '/images', classes=classes, ann_file=data_root + '/annotations/label.json'),
)
work_dir = os.path.join(data_root, 'work_dir')
runner = dict(type='EpochBasedRunner', max_epochs=100)
checkpoint_config = dict(interval=5)
load_from = r'C:\CommonProject\mmdetection\checkpoints\fcos_r101_caffe_fpn_gn-head_mstrain_640-800_2x_coco-511424d6.pth'

其中主要配置解釋如下(所有欄位詳細解釋參考 學習組態檔):

  • _base_ :繼承的基準模型,跟類的繼承差不多
  • model :模型的配置,用于覆寫所繼承基準模型的部分內容
  • dataset_type :資料集型別,主要有 CocoDatasetCityscapesDatasetLVISV05DatasetVOCDataset
  • classes :分類識別的類名
  • data :定義資料集位置,這里我們的訓練集、驗證集、測驗集都為一個
  • runner :設定訓練時所需的引數,這里設定了 epoch 為 100
  • checkpoint_config :設定每 5 輪訓練保存一個 checkpoint
  • load_from :要加載的預訓練模型

開始訓練

除了直接訓練, MMDetection 還提供很多有用的腳本用以校準模型和資料:

  1. 輸出全組態檔
    python tools/misc/print_config.py celeba/celeba.py
    
    輸出全組態檔
  2. 以5秒間隔查看資料集
    python tools/misc/browse_dataset.py celeba/celeba.py --show-interval 5
    
    以5秒間隔查看資料集
  3. 開始訓練
    python tools/train.py celeba/celeba.py
    
    如果缺少 checkpoints 檔案它會自動下載,然后只需等待其訓練完成即可:
    開始訓練

其它說明

  1. 去掉檢測結果方框的填充
    修改 mmdet\core\visualization\image.py#line 324

  2. 長視頻檢測時出現: Fail to create pixmap with Tk_GetPixmap in TkImgPhotoInstanceSetSize ( Fail to allocate bitmap) #7035
    在檢測視頻前插入以下代碼:
    import matplotlib
    matplotlib.use('agg')

參考

[1]: open-mmlab. 依賴 MMDetection 2.24.1 檔案. TesterHome. [-]
[2]: open-mmlab. 安裝 MMCV — mmcv 1.5.1 檔案. readthedocs.io. [-]
[3]: open-mmlab. mmdetection. github.com. [-]
[4]: 隔壁恒哥. win10python3.9安裝pycocotools. CSDN. [2022-04-06]
[5]: Clear butterfly. coco資料集格式介紹. CSDN. [2021-01-17]

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

標籤:其他

上一篇:如何進行自動化測驗?

下一篇:2022了你還不會『低代碼』?資料科學也能玩轉Low-Code啦! ?

標籤雲
其他(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