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 scipy import stats | |
import numpy as np | |
import seaborn as sns | |
import matplotlib.pyplot as plt | |
sns.set() # for aesthetic purposes | |
def viz(mu, std, min, max, score=None): | |
# draw a sample | |
dist = np.random.normal(mu, std, size=10000) |
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 convert as via2coco | |
# set class index (can be either 0 or 1) | |
first_class_index = 0 | |
# for those who decided to go with their own annotations | |
# data_path = '/content/annotations/output/' | |
# for those who downloaded from github | |
data_path = '/content/scrapped_data' |
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
# download the necessary functionality | |
%cd /content/ | |
!rm -rf VIA2COCO | |
!git clone https://github.com/woctezuma/VIA2COCO | |
%cd VIA2COCO/ | |
!git checkout fixes |
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
# download the necessary functionality | |
%cd /content/ | |
!rm -rf VIA2COCO | |
!git clone https://github.com/woctezuma/VIA2COCO | |
%cd VIA2COCO/ | |
!git checkout fixes |
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 google.colab import drive | |
drive.mount('/content/drive') | |
# set path to the folder! | |
PATH = # |
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
os.mkdir('annotations') # create the folder to store images in | |
PATH = 'annotations' | |
download_images('cigarette butts on the beach', PATH, 200) |
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
!wget https://github.com/dissagaliyeva/ocean-garbage-detector/releases/download/v1.0/scrapped_data.zip | |
!unzip scrapped_data.zip > /dev/null |