国产 无码 综合区,色欲AV无码国产永久播放,无码天堂亚洲国产AV,国产日韩欧美女同一区二区

GIS之深度學(xué)習(xí)10:運(yùn)行Faster RCNN算法

這篇具有很好參考價(jià)值的文章主要介紹了GIS之深度學(xué)習(xí)10:運(yùn)行Faster RCNN算法。希望對(duì)大家有所幫助。如果存在錯(cuò)誤或未考慮完全的地方,請大家不吝賜教,您也可以點(diǎn)擊"舉報(bào)違法"按鈕提交疑問。

(未完成,待補(bǔ)充)


獲取Faster RCNN源碼

(開源的很多,論文里也有,在這里不多贅述)

替換自己的數(shù)據(jù)集(圖片+標(biāo)簽文件)

(需要使用labeling生成標(biāo)簽文件)

打開終端,進(jìn)入gpupytorch環(huán)境

運(yùn)行voc_annotation.py文件生成與訓(xùn)練文件

E:\DeepLearningModel\Model01>activate gpupytorch

(gpupytorch) E:\DeepLearningModel\Model01>python voc_annotation.py
D:\Anaconda\envs\gpupytorch\lib\site-packages\numpy\_distributor_init.py:30: UserWarning: loaded more than 1 DLL from .libs:
D:\Anaconda\envs\gpupytorch\lib\site-packages\numpy\.libs\libopenblas.PYQHXLVVQ7VESDPUVUADXEVJOBGHJPAY.gfortran-win_amd64.dll
D:\Anaconda\envs\gpupytorch\lib\site-packages\numpy\.libs\libopenblas64__v0.3.21-gcc_10_3_0.dll
  warnings.warn("loaded more than 1 DLL from .libs:\n%s" %
Generate txt in ImageSets.
train and val size 777
train size 699
Generate txt in ImageSets done.
Generate 2007_train.txt and 2007_val.txt for train.

?結(jié)果所示:

GIS之深度學(xué)習(xí)10:運(yùn)行Faster RCNN算法,GIS之深度學(xué)習(xí),深度學(xué)習(xí),人工智能

(gpupytorch) E:\DeepLearningModel\Model01>python voc_annotation.py
D:\Anaconda\envs\gpupytorch\lib\site-packages\numpy\_distributor_init.py:30: UserWarning: loaded more than 1 DLL from .libs:
D:\Anaconda\envs\gpupytorch\lib\site-packages\numpy\.libs\libopenblas.PYQHXLVVQ7VESDPUVUADXEVJOBGHJPAY.gfortran-win_amd64.dll
D:\Anaconda\envs\gpupytorch\lib\site-packages\numpy\.libs\libopenblas64__v0.3.21-gcc_10_3_0.dll
  warnings.warn("loaded more than 1 DLL from .libs:\n%s" %
Generate txt in ImageSets.
train and val size 777
train size 699
Generate txt in ImageSets done.
Generate 2007_train.txt and 2007_val.txt for train.
Generate 2007_train.txt and 2007_val.txt for train done.
|  leopard | 174 |
|     boar | 491 |
| roe_deer | 352 |

(gpupytorch) E:\DeepLearningModel\Model01>

GIS之深度學(xué)習(xí)10:運(yùn)行Faster RCNN算法,GIS之深度學(xué)習(xí),深度學(xué)習(xí),人工智能

運(yùn)行:train.py文件

import colorsys
import os
import time

import numpy as np
import torch
import torch.nn as nn
from PIL import Image, ImageDraw, ImageFont

from nets.frcnn import FasterRCNN
from utils.utils import (cvtColor, get_classes, get_new_img_size, resize_image,
                         preprocess_input, show_config)
from utils.utils_bbox import DecodeBox



class FRCNN(object):
    _defaults = {

        "model_path"    : 'logs/loss_2024_03_05_22_26_24.pth',
        "classes_path"  : 'model_data/voc_classes.txt',
        "backbone"      : "resnet50",
        "confidence"    : 0.5,
        "nms_iou"       : 0.3,
        'anchors_size'  : [8, 16, 32],
        "cuda"          : True,
    }

    @classmethod
    def get_defaults(cls, n):
        if n in cls._defaults:
            return cls._defaults[n]
        else:
            return "Unrecognized attribute name '" + n + "'"
    def __init__(self, **kwargs):
        self.__dict__.update(self._defaults)
        for name, value in kwargs.items():
            setattr(self, name, value)
            self._defaults[name] = value 
        self.class_names, self.num_classes  = get_classes(self.classes_path)

        self.std    = torch.Tensor([0.1, 0.1, 0.2, 0.2]).repeat(self.num_classes + 1)[None]
        if self.cuda:
            self.std    = self.std.cuda()
        self.bbox_util  = DecodeBox(self.std, self.num_classes)
        #---------------------------------------------------#
        hsv_tuples = [(x / self.num_classes, 1., 1.) for x in range(self.num_classes)]
        self.colors = list(map(lambda x: colorsys.hsv_to_rgb(*x), hsv_tuples))
        self.colors = list(map(lambda x: (int(x[0] * 255), int(x[1] * 255), int(x[2] * 255)), self.colors))
        self.generate()

        show_config(**self._defaults)

    #---------------------------------------------------#
    #   載入模型
    #---------------------------------------------------#
    def generate(self):
        self.net    = FasterRCNN(self.num_classes, "predict", anchor_scales = self.anchors_size, backbone = self.backbone)
        device      = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
        self.net.load_state_dict(torch.load(self.model_path, map_location=device))
        self.net    = self.net.eval()
        print('{} model, anchors, and classes loaded.'.format(self.model_path))
        
        if self.cuda:
            self.net = nn.DataParallel(self.net)
            self.net = self.net.cuda()
    
    #---------------------------------------------------#
    #   檢測圖片
    #---------------------------------------------------#
    def detect_image(self, image, crop = False, count = False):
        #---------------------------------------------------#
        #   計(jì)算輸入圖片的高和寬
        #---------------------------------------------------#
        image_shape = np.array(np.shape(image)[0:2])
        #---------------------------------------------------#
        #   計(jì)算resize后的圖片的大小,resize后的圖片短邊為600
        #---------------------------------------------------#
        input_shape = get_new_img_size(image_shape[0], image_shape[1])
        #---------------------------------------------------------#
        #   在這里將圖像轉(zhuǎn)換成RGB圖像,防止灰度圖在預(yù)測時(shí)報(bào)錯(cuò)。
        #   代碼僅僅支持RGB圖像的預(yù)測,所有其它類型的圖像都會(huì)轉(zhuǎn)化成RGB
        #---------------------------------------------------------#
        image       = cvtColor(image)
        #---------------------------------------------------------#
        #   給原圖像進(jìn)行resize,resize到短邊為600的大小上
        #---------------------------------------------------------#
        image_data  = resize_image(image, [input_shape[1], input_shape[0]])
        #---------------------------------------------------------#
        #   添加上batch_size維度
        #---------------------------------------------------------#
        image_data  = np.expand_dims(np.transpose(preprocess_input(np.array(image_data, dtype='float32')), (2, 0, 1)), 0)

        with torch.no_grad():
            images = torch.from_numpy(image_data)
            if self.cuda:
                images = images.cuda()
            
            #-------------------------------------------------------------#
            #   roi_cls_locs  建議框的調(diào)整參數(shù)
            #   roi_scores    建議框的種類得分
            #   rois          建議框的坐標(biāo)
            #-------------------------------------------------------------#
            roi_cls_locs, roi_scores, rois, _ = self.net(images)
            #-------------------------------------------------------------#
            #   利用classifier的預(yù)測結(jié)果對(duì)建議框進(jìn)行解碼,獲得預(yù)測框
            #-------------------------------------------------------------#
            results = self.bbox_util.forward(roi_cls_locs, roi_scores, rois, image_shape, input_shape, 
                                                    nms_iou = self.nms_iou, confidence = self.confidence)
            #---------------------------------------------------------#
            #   如果沒有檢測出物體,返回原圖
            #---------------------------------------------------------#           
            if len(results[0]) <= 0:
                return image
                
            top_label   = np.array(results[0][:, 5], dtype = 'int32')
            top_conf    = results[0][:, 4]
            top_boxes   = results[0][:, :4]
        
        #---------------------------------------------------------#
        #   設(shè)置字體與邊框厚度
        #---------------------------------------------------------#
        font        = ImageFont.truetype(font='model_data/simhei.ttf', size=np.floor(3e-2 * image.size[1] + 0.5).astype('int32'))
        thickness   = int(max((image.size[0] + image.size[1]) // np.mean(input_shape), 1))
        #---------------------------------------------------------#
        #   計(jì)數(shù)
        #---------------------------------------------------------#
        if count:
            print("top_label:", top_label)
            classes_nums    = np.zeros([self.num_classes])
            for i in range(self.num_classes):
                num = np.sum(top_label == i)
                if num > 0:
                    print(self.class_names[i], " : ", num)
                classes_nums[i] = num
            print("classes_nums:", classes_nums)
        #---------------------------------------------------------#
        #   是否進(jìn)行目標(biāo)的裁剪
        #---------------------------------------------------------#
        if crop:
            for i, c in list(enumerate(top_label)):
                top, left, bottom, right = top_boxes[i]
                top     = max(0, np.floor(top).astype('int32'))
                left    = max(0, np.floor(left).astype('int32'))
                bottom  = min(image.size[1], np.floor(bottom).astype('int32'))
                right   = min(image.size[0], np.floor(right).astype('int32'))
                
                dir_save_path = "img_crop"
                if not os.path.exists(dir_save_path):
                    os.makedirs(dir_save_path)
                crop_image = image.crop([left, top, right, bottom])
                crop_image.save(os.path.join(dir_save_path, "crop_" + str(i) + ".png"), quality=95, subsampling=0)
                print("save crop_" + str(i) + ".png to " + dir_save_path)
        #---------------------------------------------------------#
        #   圖像繪制
        #---------------------------------------------------------#
        for i, c in list(enumerate(top_label)):
            predicted_class = self.class_names[int(c)]
            box             = top_boxes[i]
            score           = top_conf[i]

            top, left, bottom, right = box

            top     = max(0, np.floor(top).astype('int32'))
            left    = max(0, np.floor(left).astype('int32'))
            bottom  = min(image.size[1], np.floor(bottom).astype('int32'))
            right   = min(image.size[0], np.floor(right).astype('int32'))

            label = '{} {:.2f}'.format(predicted_class, score)
            draw = ImageDraw.Draw(image)
            label_size = draw.textsize(label, font)
            label = label.encode('utf-8')
            # print(label, top, left, bottom, right)
            
            if top - label_size[1] >= 0:
                text_origin = np.array([left, top - label_size[1]])
            else:
                text_origin = np.array([left, top + 1])

            for i in range(thickness):
                draw.rectangle([left + i, top + i, right - i, bottom - i], outline=self.colors[c])
            draw.rectangle([tuple(text_origin), tuple(text_origin + label_size)], fill=self.colors[c])
            draw.text(text_origin, str(label,'UTF-8'), fill=(0, 0, 0), font=font)
            del draw

        return image

    def get_FPS(self, image, test_interval):
        #---------------------------------------------------#
        #   計(jì)算輸入圖片的高和寬
        #---------------------------------------------------#
        image_shape = np.array(np.shape(image)[0:2])
        input_shape = get_new_img_size(image_shape[0], image_shape[1])
        #---------------------------------------------------------#
        #   在這里將圖像轉(zhuǎn)換成RGB圖像,防止灰度圖在預(yù)測時(shí)報(bào)錯(cuò)。
        #   代碼僅僅支持RGB圖像的預(yù)測,所有其它類型的圖像都會(huì)轉(zhuǎn)化成RGB
        #---------------------------------------------------------#
        image       = cvtColor(image)
        
        #---------------------------------------------------------#
        #   給原圖像進(jìn)行resize,resize到短邊為600的大小上
        #---------------------------------------------------------#
        image_data  = resize_image(image, [input_shape[1], input_shape[0]])
        #---------------------------------------------------------#
        #   添加上batch_size維度
        #---------------------------------------------------------#
        image_data  = np.expand_dims(np.transpose(preprocess_input(np.array(image_data, dtype='float32')), (2, 0, 1)), 0)

        with torch.no_grad():
            images = torch.from_numpy(image_data)
            if self.cuda:
                images = images.cuda()

            roi_cls_locs, roi_scores, rois, _ = self.net(images)
            #-------------------------------------------------------------#
            #   利用classifier的預(yù)測結(jié)果對(duì)建議框進(jìn)行解碼,獲得預(yù)測框
            #-------------------------------------------------------------#
            results = self.bbox_util.forward(roi_cls_locs, roi_scores, rois, image_shape, input_shape, 
                                                    nms_iou = self.nms_iou, confidence = self.confidence)
        t1 = time.time()
        for _ in range(test_interval):
            with torch.no_grad():
                roi_cls_locs, roi_scores, rois, _ = self.net(images)
                #-------------------------------------------------------------#
                #   利用classifier的預(yù)測結(jié)果對(duì)建議框進(jìn)行解碼,獲得預(yù)測框
                #-------------------------------------------------------------#
                results = self.bbox_util.forward(roi_cls_locs, roi_scores, rois, image_shape, input_shape, 
                                                        nms_iou = self.nms_iou, confidence = self.confidence)
                
        t2 = time.time()
        tact_time = (t2 - t1) / test_interval
        return tact_time

    #---------------------------------------------------#
    #   檢測圖片
    #---------------------------------------------------#
    def get_map_txt(self, image_id, image, class_names, map_out_path):
        f = open(os.path.join(map_out_path, "detection-results/"+image_id+".txt"),"w")
        #---------------------------------------------------#
        #   計(jì)算輸入圖片的高和寬
        #---------------------------------------------------#
        image_shape = np.array(np.shape(image)[0:2])
        input_shape = get_new_img_size(image_shape[0], image_shape[1])
        #---------------------------------------------------------#
        #   在這里將圖像轉(zhuǎn)換成RGB圖像,防止灰度圖在預(yù)測時(shí)報(bào)錯(cuò)。
        #   代碼僅僅支持RGB圖像的預(yù)測,所有其它類型的圖像都會(huì)轉(zhuǎn)化成RGB
        #---------------------------------------------------------#
        image       = cvtColor(image)
        
        #---------------------------------------------------------#
        #   給原圖像進(jìn)行resize,resize到短邊為600的大小上
        #---------------------------------------------------------#
        image_data  = resize_image(image, [input_shape[1], input_shape[0]])
        #---------------------------------------------------------#
        #   添加上batch_size維度
        #---------------------------------------------------------#
        image_data  = np.expand_dims(np.transpose(preprocess_input(np.array(image_data, dtype='float32')), (2, 0, 1)), 0)

        with torch.no_grad():
            images = torch.from_numpy(image_data)
            if self.cuda:
                images = images.cuda()

            roi_cls_locs, roi_scores, rois, _ = self.net(images)
            #-------------------------------------------------------------#
            #   利用classifier的預(yù)測結(jié)果對(duì)建議框進(jìn)行解碼,獲得預(yù)測框
            #-------------------------------------------------------------#
            results = self.bbox_util.forward(roi_cls_locs, roi_scores, rois, image_shape, input_shape, 
                                                    nms_iou = self.nms_iou, confidence = self.confidence)
            #--------------------------------------#
            #   如果沒有檢測到物體,則返回原圖
            #--------------------------------------#
            if len(results[0]) <= 0:
                return 

            top_label   = np.array(results[0][:, 5], dtype = 'int32')
            top_conf    = results[0][:, 4]
            top_boxes   = results[0][:, :4]
        
        for i, c in list(enumerate(top_label)):
            predicted_class = self.class_names[int(c)]
            box             = top_boxes[i]
            score           = str(top_conf[i])

            top, left, bottom, right = box
            if predicted_class not in class_names:
                continue

            f.write("%s %s %s %s %s %s\n" % (predicted_class, score[:6], str(int(left)), str(int(top)), str(int(right)),str(int(bottom))))

        f.close()
        return 

?終端/編碼器運(yùn)行:

E:\DeepLearningModel\Model01>activate gpupytorch

(gpupytorch) E:\DeepLearningModel\Model01>python train.py
D:\Anaconda\envs\gpupytorch\lib\site-packages\numpy\_distributor_init.py:30: UserWarning: loaded more than 1 DLL from .libs:
D:\Anaconda\envs\gpupytorch\lib\site-packages\numpy\.libs\libopenblas.PYQHXLVVQ7VESDPUVUADXEVJOBGHJPAY.gfortran-win_amd64.dll
D:\Anaconda\envs\gpupytorch\lib\site-packages\numpy\.libs\libopenblas64__v0.3.21-gcc_10_3_0.dll
  warnings.warn("loaded more than 1 DLL from .libs:\n%s" %
Number of devices: 1
initialize network with normal type
Load weights model_data/voc_weights_resnet.pth.

Successful Load Key: ['extractor.0.weight', 'extractor.1.weight', 'extractor.1.bias', 'extractor.1.running_mean', 'extractor.1.running_var', 'extractor.1.num_batches_tracked', 'extractor.4.0.conv1.weight', 'extractor.4.0.bn1.weight', 'extractor.4.0.bn1.bias', 'extractor.4.0.bn1.running_mean', 'extractor.4.0.bn1.running_var', 'extractor.4.0.bn1.num_batches_tracked', 'extractor.4.0.conv2.weight', 'extractor.4.0.bn2.weight', 'extractor.4.0.bn2.bias', 'extractor.4.0.bn2.running_mean', 'extractor.4.0.bn2.running_var', 'e ……
Successful Load Key Num: 324

Fail To Load Key: ['head.cls_loc.weight', 'head.cls_loc.bias', 'head.score.weight', 'head.score.bias'] ……
Fail To Load Key num: 4

溫馨提示,head部分沒有載入是正?,F(xiàn)象,Backbone部分沒有載入是錯(cuò)誤的。
Configurations:
----------------------------------------------------------------------
|                     keys |                                   values|
----------------------------------------------------------------------
|             classes_path |               model_data/voc_classes.txt|
|               model_path |        model_data/voc_weights_resnet.pth|
|              input_shape |                               [600, 600]|
|               Init_Epoch |                                        0|
|             Freeze_Epoch |                                       50|
|           UnFreeze_Epoch |                                      100|
|        Freeze_batch_size |                                        4|
|      Unfreeze_batch_size |                                        2|
|             Freeze_Train |                                     True|
|                  Init_lr |                                   0.0001|
|                   Min_lr |                   1.0000000000000002e-06|
|           optimizer_type |                                     adam|
|                 momentum |                                      0.9|
|            lr_decay_type |                                      cos|
|              save_period |                                        5|
|                 save_dir |                                     logs|
|              num_workers |                                        4|
|                num_train |                                      699|
|                  num_val |                                       78|
----------------------------------------------------------------------
Start Train
Epoch 1/100:   0%|                                                               | 0/174 [00:00<?, ?it/s<class 'dict'>]D:\Anaconda\envs\gpupytorch\lib\site-packages\numpy\_distributor_init.py:30: UserWarning: loaded more than 1 DLL from .libs:
D:\Anaconda\envs\gpupytorch\lib\site-packages\numpy\.libs\libopenblas.PYQHXLVVQ7VESDPUVUADXEVJOBGHJPAY.gfortran-win_amd64.dll

GIS之深度學(xué)習(xí)10:運(yùn)行Faster RCNN算法,GIS之深度學(xué)習(xí),深度學(xué)習(xí),人工智能

查看結(jié)果:

Calculate Map.
96.35% = boar AP        ||      score_threhold=0.5 : F1=0.81 ; Recall=97.92% ; Precision=69.12%
94.74% = leopard AP     ||      score_threhold=0.5 : F1=0.90 ; Recall=94.74% ; Precision=85.71%
94.97% = roe_deer AP    ||      score_threhold=0.5 : F1=0.86 ; Recall=96.88% ; Precision=77.50%
mAP = 95.35%
Get map done.
Epoch:100/100
Total Loss: 0.505 || Val Loss: 0.621
Save best model to best_epoch_weights.pth

GIS之深度學(xué)習(xí)10:運(yùn)行Faster RCNN算法,GIS之深度學(xué)習(xí),深度學(xué)習(xí),人工智能文章來源地址http://www.zghlxwxcb.cn/news/detail-839159.html

到了這里,關(guān)于GIS之深度學(xué)習(xí)10:運(yùn)行Faster RCNN算法的文章就介紹完了。如果您還想了解更多內(nèi)容,請?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!

本文來自互聯(lián)網(wǎng)用戶投稿,該文觀點(diǎn)僅代表作者本人,不代表本站立場。本站僅提供信息存儲(chǔ)空間服務(wù),不擁有所有權(quán),不承擔(dān)相關(guān)法律責(zé)任。如若轉(zhuǎn)載,請注明出處: 如若內(nèi)容造成侵權(quán)/違法違規(guī)/事實(shí)不符,請點(diǎn)擊違法舉報(bào)進(jìn)行投訴反饋,一經(jīng)查實(shí),立即刪除!

領(lǐng)支付寶紅包贊助服務(wù)器費(fèi)用

相關(guān)文章

  • Faster-RCNN環(huán)境搭配及運(yùn)行教程

    Faster-RCNN環(huán)境搭配及運(yùn)行教程

    最近正在學(xué)習(xí)Faster-RCNN,環(huán)境歷經(jīng)一天時(shí)間終于成功安裝,借此記錄下整體安裝過程 本教程是Windows 10 + Python35 + CUDA 10.0 + cudnn 7.4.1.5 + tensorflow-gpu 1.13.2環(huán)境的配置過程 所使用的軟件包括 名稱 版本 CUDA 10.0 CUDNN 7.4.1.5 Anaconda3 4.2.0 Pycharm 2019.3.5 整體過程中所需要的軟件包我都放在

    2024年02月04日
    瀏覽(26)
  • 目標(biāo)檢測算法:Faster-RCNN論文解讀

    目標(biāo)檢測算法:Faster-RCNN論文解讀

    前言 ? 其實(shí)網(wǎng)上已經(jīng)有很多很好的解讀各種論文的文章了,但是我決定自己也寫一寫,當(dāng)然,我的主要目的就是幫助自己梳理、深入理解論文,因?yàn)閷懳恼?,你必須把你所寫的東西表達(dá)清楚而正確,我認(rèn)為這是一種很好的鍛煉,當(dāng)然如果可以幫助到網(wǎng)友,也是很開心的事情

    2024年02月08日
    瀏覽(26)
  • 【計(jì)算機(jī)視覺面經(jīng)四】基于深度學(xué)習(xí)的目標(biāo)檢測算法面試必備(RCNN~YOLOv5)

    【計(jì)算機(jī)視覺面經(jīng)四】基于深度學(xué)習(xí)的目標(biāo)檢測算法面試必備(RCNN~YOLOv5)

    目標(biāo)檢測算法主要包括:【兩階段】目標(biāo)檢測算法、【多階段】目標(biāo)檢測算法、【單階段】目標(biāo)檢測算法。 什么是兩階段目標(biāo)檢測算法,與單階段目標(biāo)檢測有什么區(qū)別? 兩階段目標(biāo)檢測算法因需要進(jìn)行兩階段的處理:1)候選區(qū)域的獲取,2)候選區(qū)域分類和回歸,也稱為基于

    2024年03月27日
    瀏覽(26)
  • 目標(biāo)檢測前言,RCNN,F(xiàn)ast RCNN,F(xiàn)aster RCNN

    目標(biāo)檢測前言,RCNN,F(xiàn)ast RCNN,F(xiàn)aster RCNN

    找到概率最高的目標(biāo)之后,與其他目標(biāo)進(jìn)行IOU交并比計(jì)算,若高于一定值,則說明這兩張圖片預(yù)測的是同一個(gè)目標(biāo),則把概率低的目標(biāo)刪掉 因?yàn)槭侵苯拥玫教卣鲌D之后進(jìn)行映射,所以不限制輸入圖像尺寸 Gx,Gy是調(diào)整中心點(diǎn),Dx(P)是回歸參數(shù),exp就是e的多少次方 從提取到的

    2024年02月07日
    瀏覽(40)
  • 目標(biāo)檢測——Faster RCNN

    目標(biāo)檢測——Faster RCNN

    Faster RCNN是由 R-CNN、Fast R-CNN 改進(jìn)而來,是非常經(jīng)典的目標(biāo)檢測的兩階段網(wǎng)絡(luò)。 此篇博客是我通過學(xué)習(xí)以下優(yōu)秀博客歸納整理而得: 一文讀懂Faster RCNN - 知乎 Faster R-CNN詳解和網(wǎng)絡(luò)模型搭建 - 知乎 Faster R-CNN:詳解目標(biāo)檢測的實(shí)現(xiàn)過程 - 郭耀華 - 博客園 yolov5與Faster-RCNN 訓(xùn)練過程

    2024年02月06日
    瀏覽(33)
  • 【YOLOv8/YOLOv7/YOLOv5/YOLOv4/Faster-rcnn系列算法改進(jìn)NO.64】即插即用新的注意力機(jī)制RFAConv

    【YOLOv8/YOLOv7/YOLOv5/YOLOv4/Faster-rcnn系列算法改進(jìn)NO.64】即插即用新的注意力機(jī)制RFAConv

    ?前言 作為當(dāng)前先進(jìn)的深度學(xué)習(xí)目標(biāo)檢測算法YOLOv8,已經(jīng)集合了大量的trick,但是還是有提高和改進(jìn)的空間,針對(duì)具體應(yīng)用場景下的檢測難點(diǎn),可以不同的改進(jìn)方法。此后的系列文章,將重點(diǎn)對(duì)YOLOv8的如何改進(jìn)進(jìn)行詳細(xì)的介紹,目的是為了給那些搞科研的同學(xué)需要?jiǎng)?chuàng)新點(diǎn)或者

    2024年02月02日
    瀏覽(61)
  • Faster RCNN模型如何自定義損失函數(shù)

    /lib/model/faster_rcnn/faster_rcnn.py /lib/model/faster_rcnn/resnet.py 與1.2同理 1.4.1 模型代碼:/lib/model/faster_rcnn/faster_rcnn.py,/lib/model/faster_rcnn/resnet.py,/lib/model/faster_rcnn/vgg16.py 1.4.2 訓(xùn)練代碼:trainval_net.py 1.4.3 測試代碼:test_net.py 1.4.4 運(yùn)行參數(shù)代碼:libmodelutilsparser_func.py 修改/lib/model/fa

    2023年04月17日
    瀏覽(19)
  • 基于Faster rcnn pytorch的遙感圖像檢測

    基于Faster rcnn pytorch的遙感圖像檢測

    代碼:https://github.com/jwyang/faster-rcnn.pytorch/tree/pytorch-1.0 使用RSOD遙感數(shù)據(jù)集,VOC的數(shù)據(jù)格式如下: RSOD是一個(gè)開放的目標(biāo)檢測數(shù)據(jù)集,用于遙感圖像中的目標(biāo)檢測。數(shù)據(jù)集包含飛機(jī),油箱,運(yùn)動(dòng)場和立交橋,以PASCAL VOC數(shù)據(jù)集的格式進(jìn)行標(biāo)注。 數(shù)據(jù)集包括4個(gè)文件夾,每個(gè)文件夾

    2024年02月06日
    瀏覽(51)
  • Faster RCNN訓(xùn)練自己的數(shù)據(jù)集【傻瓜式教程】

    Faster RCNN訓(xùn)練自己的數(shù)據(jù)集【傻瓜式教程】

    本文采用的源碼是:https://github.com/dBeker/Faster-RCNN-TensorFlow-Python3 由于本文是小白教程,光寫幾個(gè)環(huán)境怕有人配置不好或者配置版本搞亂。Faster RCNN配置環(huán)境比較復(fù)雜。我在這直接貼圖我的環(huán)境版本圖: 先安裝tensorflow-gpu,然后依次安裝cython、opencv-python、easydict、Pillow、matplot

    2024年02月02日
    瀏覽(25)
  • YOLOv8/YOLOv7/YOLOv5/YOLOv4/Faster-rcnn系列算法改進(jìn)【NO.69】針對(duì)遙感圖像目標(biāo)檢測中的小目標(biāo)進(jìn)行改進(jìn)CATnet(ContextAggregation模塊)

    YOLOv8/YOLOv7/YOLOv5/YOLOv4/Faster-rcnn系列算法改進(jìn)【NO.69】針對(duì)遙感圖像目標(biāo)檢測中的小目標(biāo)進(jìn)行改進(jìn)CATnet(ContextAggregation模塊)

    前言 作為當(dāng)前先進(jìn)的深度學(xué)習(xí)目標(biāo)檢測算法YOLOv8,已經(jīng)集合了大量的trick,但是還是有提高和改進(jìn)的空間,針對(duì)具體應(yīng)用場景下的檢測難點(diǎn),可以不同的改進(jìn)方法。此后的系列文章,將重點(diǎn)對(duì)YOLOv8的如何改進(jìn)進(jìn)行詳細(xì)的介紹,目的是為了給那些搞科研的同學(xué)需要?jiǎng)?chuàng)新點(diǎn)或者搞

    2024年02月11日
    瀏覽(35)

覺得文章有用就打賞一下文章作者

支付寶掃一掃打賞

博客贊助

微信掃一掃打賞

請作者喝杯咖啡吧~博客贊助

支付寶掃一掃領(lǐng)取紅包,優(yōu)惠每天領(lǐng)

二維碼1

領(lǐng)取紅包

二維碼2

領(lǐng)紅包