Skip to content

Instantly share code, notes, and snippets.

View jpcbertoldo's full-sized avatar
:shipit:

Joao P C Bertoldo jpcbertoldo

:shipit:
View GitHub Profile
# %%
# Scratch of spro on a batch of images
import torch
# ---- Dummy data ----
# a batch of predictions for two images
# shape: (2, 1, 256, 256)
predictions = torch.rand(2, 1, 256, 256)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jpcbertoldo
jpcbertoldo / .gitignore
Last active September 10, 2023 19:09
2023-08 Anomaly Segmentation Metrics for Anomalib — GSoC 2023 @ OpenVINO — DEMO
lightning_logs/
.cache
@jpcbertoldo
jpcbertoldo / gsoc23.md
Last active June 7, 2024 08:16
Anomaly Segmentation Metrics for Anomalib — GSoC 2023 @ OpenVINO

Anomaly Segmentation Metrics for Anomalib — GSoC 2023 @ OpenVINO

Google Summer of Code 2023

Project: Anomaly Segmentation Metrics for anomalib

Organization: OpenVINO (https://github.com/openvinotoolkit/openvino)

Mentors: @samet-akcay, @djdameln

@jpcbertoldo
jpcbertoldo / np_round_significant_digits.py
Created June 7, 2023 15:23
A function to round up an array of values based on the number of significant digits (useful for sequences spanning over many scales)
"""
Source of the idea: https://stackoverflow.com/a/58491045/9582881
"""
import numpy as np
def round_significant_digits(x, dtype=np.float64, precision=4):
string = np.format_float_positional(x, unique=False, fractional=False, trim='k', precision=precision)
return dtype(string)
@jpcbertoldo
jpcbertoldo / how_many_wilcoxon_statistics_values_are_there.ipynb
Last active January 13, 2023 16:03
how many wilcoxon statistics values are there?
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.
@jpcbertoldo
jpcbertoldo / 2023-11-matrix-multiplication.ipynb
Last active December 13, 2023 15:05
2023-11-matrix-multiplication.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.