Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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
| gst-launch-1.0 v4l2src device=/dev/video0 ! xvimagesink |
This file contains hidden or 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 torchvision import datasets, models, transforms | |
| from PIL import Image | |
| import torch | |
| import matplotlib.pyplot as plt | |
| from pathlib import Path | |
| images = list(Path('../foo').glob('**/*.*')) | |
| example = images.pop() | |
| img = Image.open(example).convert('RGB') |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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 prodigy | |
| from prodigy.components.loaders import Images | |
| from prodigy.util import split_string | |
| def add_label_to_stream(stream, label): | |
| for eg in stream: | |
| # The 'label' you get from the command line is a list | |
| # so let's just assume it's always one and take the first | |
| eg["label"] = label[0] | |
| yield eg |
This file contains hidden or 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 numpy as np | |
| import shutil | |
| from sklearn.model_selection import train_test_split | |
| cats = ['negative', 'positives'] | |
| for cat in cats: | |
| print(cat) | |
| if not os.path.exists(data_folder + "/train/" + cat): | |
| os.makedirs(data_folder + "/train/" + cat) |
This file contains hidden or 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
| Suppose that we want to break | |
| {Hello}, {World} | |
| into | |
| {Hello}, | |
| {World} | |
| do | |
| = SUBSTITUTE(B2, "}, {", CONCATENATE("'} ", char(10), "{")) |