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 numpy as np | |
import json | |
import matplotlib.pyplot as plt | |
from collections import Counter | |
# For jupyter notebook | |
#%matplotlib inline | |
# TODO: Clean up this code |
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 image_slicer | |
from PIL import Image | |
def parser(): | |
arg_parser = argparse.ArgumentParser('Image Slicer') | |
arg_parser.add_argument('--image', help='Image to be sliced') | |
arg_parser.add_argument('--num_tiles', help='Number of tiles') | |
arg_parser.add_argument('--save_tiles', help="Save tiles",action='store_true') | |
arg_parser.add_argument('--tiles_dir',help="Directory to store tiles",type=str) | |
return arg_parser.parse_args() |
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
""" | |
Script for visualising the size comparison between the object and the image to determine accurate anchor sizes | |
""" | |
from PIL import Image | |
import numpy as np | |
img_size = (1024,1024) | |
obj_size = (16,16) |
NewerOlder