Skip to content

Commit

Permalink
fix: correct import paths
Browse files Browse the repository at this point in the history
  • Loading branch information
danellecline committed Mar 5, 2024
1 parent ed5dec7 commit 6ca36e1
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
13 changes: 7 additions & 6 deletions sdcat/cluster/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,18 @@
import pytz
import torch

import common_args
from config import config as cfg
from logger import info, err, warn
from sdcat import common_args
from sdcat.config import config as cfg
from sdcat.logger import info, err, warn
from sdcat.cluster.cluster import cluster_vits


@click.command('cluster', help='Cluster detections. See cluster --config-ini to override cluster defaults.')
@common_args.config_ini
@click.option('--det-dir', help='Input folder(s) with raw detection results', multiple=True)
@click.option('--save-dir', help='Output directory to save clustered detection results')
@click.option('--save-dir', help='Output directory to save clustered detection results')
@click.option('--device', help='Device to use.', type=int)
def run_cluster(det_dir, save_dir, device, config_ini):

config = cfg.Config(config_ini)
max_area = int(config('cluster', 'max_area'))
min_area = int(config('cluster', 'min_area'))
Expand Down Expand Up @@ -219,7 +219,8 @@ def is_day(utc_dt):
prefix = f'{model}_{datetime.now().strftime("%Y%m%d_%H%M%S")}'

# Cluster the detections
df_cluster = cluster_vits(prefix, model, df, save_dir, alpha, cluster_selection_epsilon, min_similarity, min_cluster_size, min_samples)
df_cluster = cluster_vits(prefix, model, df, save_dir, alpha, cluster_selection_epsilon, min_similarity,
min_cluster_size, min_samples)

# Merge the results with the original DataFrame
df.update(df_cluster)
Expand Down
13 changes: 6 additions & 7 deletions sdcat/detect/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,12 @@
from sahi import AutoDetectionModel
from sahi.postprocess.combine import nms

import logger
import common_args
from config import config as cfg
from config.config import default_config_ini
from detect.sahi_detector import run_sahi_detect_bulk, run_sahi_detect
from detect.saliency_detector import run_saliency_detect, run_saliency_detect_bulk
from logger import exception, info, warn
from sdcat import common_args
from sdcat.config import config as cfg
from sdcat.config.config import default_config_ini
from sdcat.detect.sahi_detector import run_sahi_detect_bulk, run_sahi_detect
from sdcat.detect.saliency_detector import run_saliency_detect, run_saliency_detect_bulk
from sdcat.logger import exception, info, warn

default_model = 'MBARI/megamidwater'

Expand Down

0 comments on commit 6ca36e1

Please sign in to comment.