Remove editor module
This commit is contained in:
parent
e5959268c1
commit
c966866abc
37 changed files with 4063 additions and 3656 deletions
|
|
@ -1,4 +1,4 @@
|
||||||
from editor.histogram_transfer import pdf_transfer_3d
|
from histogram_transfer import pdf_transfer_3d
|
||||||
import numpy as np
|
import numpy as np
|
||||||
from scipy.ndimage import zoom
|
from scipy.ndimage import zoom
|
||||||
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -1,7 +1,7 @@
|
||||||
import numpy as np
|
import numpy as np
|
||||||
from editor.utils import generate_rotation_matrices
|
from utils import generate_rotation_matrices
|
||||||
from editor.histogram_transfer import pdf_transfer_1d
|
from histogram_transfer import pdf_transfer_1d
|
||||||
from editor.histogram_transfer import regrain
|
from histogram_transfer import regrain
|
||||||
|
|
||||||
|
|
||||||
EPSILON = 1e-6
|
EPSILON = 1e-6
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
from PIL import Image
|
from PIL import Image
|
||||||
from ..utils import random
|
from utils import random
|
||||||
|
|
||||||
|
|
||||||
def add_random_colour_spill(image: Image, range: float) -> Image:
|
def add_random_colour_spill(image: Image, range: float) -> Image:
|
||||||
|
|
@ -22,7 +22,7 @@
|
||||||
"\n",
|
"\n",
|
||||||
"import matplotlib.pyplot as plt\n",
|
"import matplotlib.pyplot as plt\n",
|
||||||
"import numpy as np\n",
|
"import numpy as np\n",
|
||||||
"from editor.operations import get_random_saturation_per_hue_lut\n",
|
"from operations import get_random_saturation_per_hue_lut\n",
|
||||||
"\n",
|
"\n",
|
||||||
"\n",
|
"\n",
|
||||||
"plt.figure(figsize=(5, 3))\n",
|
"plt.figure(figsize=(5, 3))\n",
|
||||||
|
|
@ -54,7 +54,7 @@
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"source": [
|
"source": [
|
||||||
"from editor.operations import get_random_brightness_lut\n",
|
"from operations import get_random_brightness_lut\n",
|
||||||
"\n",
|
"\n",
|
||||||
"\n",
|
"\n",
|
||||||
"plt.figure(figsize=(5, 3))\n",
|
"plt.figure(figsize=(5, 3))\n",
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import numpy as np
|
import numpy as np
|
||||||
from typing import List
|
from typing import List
|
||||||
from ..utils.random import random
|
from utils.random import random
|
||||||
from .interpolate import interpolate, INTERPOLATION_TYPE
|
from .interpolate import interpolate, INTERPOLATION_TYPE
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
from torch.utils.data import Dataset
|
from torch.utils.data import Dataset
|
||||||
from typing import List, Optional, Tuple
|
from typing import List, Optional, Tuple
|
||||||
from editor.utils import compute_histogram
|
from utils import compute_histogram
|
||||||
from .random_edit import random_edit
|
from .random_edit import random_edit
|
||||||
from PIL import Image
|
from PIL import Image
|
||||||
from tqdm import tqdm
|
from tqdm import tqdm
|
||||||
|
|
@ -16,9 +16,10 @@ PIL.Image.MAX_IMAGE_PIXELS = None
|
||||||
class HistogramDataset(Dataset):
|
class HistogramDataset(Dataset):
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
|
/,
|
||||||
paths: List[Path],
|
paths: List[Path],
|
||||||
|
bin_count: int,
|
||||||
edit_count: int = 5,
|
edit_count: int = 5,
|
||||||
bin_count: int = 32,
|
|
||||||
target_size=(240, 240),
|
target_size=(240, 240),
|
||||||
delete_corrupt_images: bool = False,
|
delete_corrupt_images: bool = False,
|
||||||
cache_path: Optional[Path] = None,
|
cache_path: Optional[Path] = None,
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
from PIL import Image, ImageEnhance
|
from PIL import Image, ImageEnhance
|
||||||
from ..utils import random
|
from utils import random
|
||||||
from ..operations import (
|
from operations import (
|
||||||
add_noise,
|
add_noise,
|
||||||
add_random_colour_spill,
|
add_random_colour_spill,
|
||||||
get_random_gamma,
|
get_random_gamma,
|
||||||
Loading…
Add table
Add a link
Reference in a new issue