Skip to content

Commit

Permalink
Refactor tasnif.py: Organize imports and update class attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
cobanov committed Mar 11, 2024
1 parent e59e561 commit 1d2cf25
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions tasnif/tasnif.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,12 @@
from tqdm import tqdm

from .calculations import calculate_kmeans, calculate_pca, get_embeddings
from .utils import (create_dir, create_image_grid, read_images_from_directory,
read_with_pil)
from .utils import (
create_dir,
create_image_grid,
read_images_from_directory,
read_with_pil,
)

warnings.filterwarnings("ignore")

Expand All @@ -19,10 +23,12 @@ def __init__(self, num_classes, pca_dim=16, use_gpu=False):
self.use_gpu = use_gpu
self.embeddings = None
self.pca_embeddings = None
self.centroids = None
self.centroid = None
self.labels = None
self.image_paths = None
self.images = []
self.project_name = None
self.counts = None

def read(self, folder_path):
"""
Expand Down

0 comments on commit 1d2cf25

Please sign in to comment.