賽題名稱:零基礎入門cv之街道字元識別
1.匯入所需庫
import os, sys, glob, shutil, json
os.environ[
"cuda_visible_devices"]=
'0'import cv2
import matplotlib.pyplot as plt
from pil import image
import numpy as np
from tqdm import tqdm, tqdm_notebook
import torch
torch.manual_seed(0)
torch.backends.cudnn.deterministic =
false
torch.backends.cudnn.benchmark =
true
import torchvision.models as models
import torchvision.transforms as transforms
import torchvision.datasets as datasets
import torch.nn as nn
import torch.nn.functional as f
import torch.optim as optim
from torch.autograd import variable
from torch.utils.data.dataset import dataset
2.賽題資料
3.資料標籤
4.評測指標
5.讀取資料
import json
train_json = json.load(
open
(r"d:\input\mchar_train.json"))
defparse_json
(d):
arr = np.array(
[ d[
'top'
], d[
'height'
], d[
'left'
], d[
'width'
], d[
'label']]
)#儲存資料標籤
6.解題思路
7.簡單入門思路:定長字元識別
8.專業字元識別思路:不定長字元識別
9.專業分類思路:檢測再識別
Datawhale 零基礎入門CV賽事
本章將會講解卷積神經網路 convolutional neural network,cnn 的常見層,並從頭搭建乙個字元識別模型。學習cnn基礎和原理 使用pytorch框架構建cnn模型,並完成訓練 卷積神經網路 簡稱cnn 是一類特殊的人工神經網路,是深度學習中重要的乙個分支。cnn在很多領域都...
Datawhale 零基礎入門CV賽事
在機器學習模型 特別是深度學習模型 的訓練過程中,模型是非常容易過擬合的。深度學習模型在不斷的訓練過程中訓練誤差會逐漸降低,但測試誤差的走勢則不一定。在模型的訓練過程中,模型只能利用訓練資料來進行訓練,模型並不能接觸到測試集上的樣本。因此模型如果將訓練集學的過好,模型就會記住訓練樣本的細節,導致模型...
Datawhale 零基礎入門金融風控(一)
一般而言,對於資料在比賽介面都有對應的資料概況介紹 匿名特徵除外 說明列的性質特徵。了解列的性質會有助於我們對於資料的理解和後續分析。train.csv id 為貸款清單分配的唯一信用證標識 loanamnt 貸款金額 term 貸款期限 year interestrate 貸款利率 install...