-
-
Save amankharwal/8cd93b0f38f1d090746802592097c395 to your computer and use it in GitHub Desktop.
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
lucky_test_samples = np.random.randint(0, len(df), 5) | |
reduced_df = df.drop(lucky_test_samples, axis=0) | |
WIDTH = 224 | |
HEIGHT = 224 | |
CHANNEL = 3 | |
def show_img(index): | |
image = cv2.imread("Indian Number Plates/" + df["image_name"].iloc[index]) | |
image = cv2.cvtColor(image, cv2.COLOR_BGR2RGB) | |
image = cv2.resize(image, dsize=(WIDTH, HEIGHT)) | |
tx = int(df["top_x"].iloc[index] * WIDTH) | |
ty = int(df["top_y"].iloc[index] * HEIGHT) | |
bx = int(df["bottom_x"].iloc[index] * WIDTH) | |
by = int(df["bottom_y"].iloc[index] * HEIGHT) | |
image = cv2.rectangle(image, (tx, ty), (bx, by), (0, 0, 255), 1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment