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
#include <iostream> | |
using namespace std; | |
class Node { | |
public: | |
int value; | |
int height; | |
Node* left; | |
Node* right; | |
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 PIL import Image | |
import sys | |
import os | |
import numpy as np | |
def create_empty_label_masks(input_directory, output_directory): | |
if not os.path.exists(output_directory): | |
os.makedirs(output_directory) | |
for filename in os.listdir(input_directory): |
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 PIL import Image | |
import sys | |
import os | |
def convert_jpeg_to_png(input_directory, output_directory): | |
if not os.path.exists(output_directory): | |
os.makedirs(output_directory) | |
for filename in os.listdir(input_directory): | |
if filename.lower().endswith(('.jpg', '.jpeg')): |