This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from matplotlib import pyplot as plt | |
fig, ax = plt.subplots() | |
ax.imshow(c, cmap="gray") | |
plt.show() | |
if __name__ == '__main__': | |
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"images": [ | |
{ | |
"id": 48, | |
"dataset_id": 16, | |
"category_ids": [ | |
1 | |
], | |
"path": "/datasets/mathand/train/IMG_3100.jpeg", | |
"width": 512, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import pathlib | |
import json | |
import numpy as np | |
import cv2 | |
from detectron2.structures import BoxMode | |
from detectron2.data import MetadataCatalog, DatasetCatalog |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import torch | |
from torch import nn | |
from torch.utils.data import DataLoader | |
from torchvision import datasets | |
import torchvision | |
from torchvision.transforms import ToTensor | |
import torchvision.transforms as transforms | |
normalize = transforms.Normalize(mean=[0.485, 0.456, 0.406], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import torch | |
from torch import nn | |
from torch.utils.data import DataLoader | |
from torchvision import datasets | |
from torchvision.transforms import ToTensor, Lambda | |
training_data = datasets.FashionMNIST( | |
root="data", | |
train=True, | |
download=True, |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
mas-cli/mas: Mac App Store command line interface というcliを使う。
brew install mas
下記のように使う。
NewerOlder