have this code, first i need to load images from dir and the create emb reformat the…
- User
have this code, first i need to load images from dir and the create emb reformat the script import lightly_train import pandas as pd from tqdm import tqdm from pathlib import Path
if name == "main":
codedf = pd.read_csv('/data/mvgordienko/un_learning/phash_cleaned_train_df_th_7_5.csv') df = df[df['label'] == 1].sample(10000) # Функция для создания мягкой ссылки на файл в папке 'ssl_train' for index, row in tqdm(df.iterrows(), total=len(df), desc="Копирование файлов"): path = Path(row['path']) target_path = Path('/mnt/ml/msirotkin/') / path.name if target_path.exists(): target_path.unlink() if path.exists() and not target_path.exists(): target_path.symlink_to(path.resolve().absolute()) else: print(f"Файл {row['path']} не существует") lightly_train.embed( out="exported_phash_cleaned_train.pt", data=df['path'].to_list(), checkpoint="last.ckpt", format="torch", overwrite=True )
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.