From 1f5848625b0f88a27247a661cc65f4d3a1d6aa10 Mon Sep 17 00:00:00 2001 From: aimspot Date: Wed, 5 Jun 2024 17:35:49 +0300 Subject: [PATCH] update --- .../__pycache__/split_dataset.cpython-38.pyc | Bin 5256 -> 0 bytes .../__pycache__/utils.cpython-38.pyc | Bin 2825 -> 0 bytes .../annotation_analysis.cpython-38.pyc | Bin 2397 -> 0 bytes .../dataset_processing_module.cpython-38.pyc | Bin 2079 -> 0 bytes .../__pycache__/image_analysis.cpython-38.pyc | Bin 7412 -> 0 bytes .../__pycache__/plots.cpython-38.pyc | Bin 2984 -> 0 bytes .../recommendation_module.cpython-38.pyc | Bin 3157 -> 0 bytes .../ml_processing/annotation_analysis.py | 115 ++++++++++++++++++ .../dataset_processing_module.py | 5 +- .../ml_processing/image_analysis.py | 62 ---------- src/data_processing/ml_processing/plots.py | 16 ++- .../ml_processing/recommendation_module.py | 11 +- .../catboost_info/catboost_training.json | 104 ---------------- .../catboost_info/learn/events.out.tfevents | Bin 5998 -> 0 bytes src/ml_utils/catboost_info/learn_error.tsv | 101 --------------- src/ml_utils/catboost_info/time_left.tsv | 101 --------------- src/train_utils/config/train_config.yaml | 2 +- .../train_models/scripts/yolov5_train.py | 7 +- .../train_models/scripts/yolov7_train.py | 6 +- 19 files changed, 141 insertions(+), 389 deletions(-) delete mode 100644 src/data_processing/data_utils/__pycache__/split_dataset.cpython-38.pyc delete mode 100644 src/data_processing/data_utils/__pycache__/utils.cpython-38.pyc delete mode 100644 src/data_processing/ml_processing/__pycache__/annotation_analysis.cpython-38.pyc delete mode 100644 src/data_processing/ml_processing/__pycache__/dataset_processing_module.cpython-38.pyc delete mode 100644 src/data_processing/ml_processing/__pycache__/image_analysis.cpython-38.pyc delete mode 100644 src/data_processing/ml_processing/__pycache__/plots.cpython-38.pyc delete mode 100644 src/data_processing/ml_processing/__pycache__/recommendation_module.cpython-38.pyc delete mode 100644 src/ml_utils/catboost_info/catboost_training.json delete mode 100644 src/ml_utils/catboost_info/learn/events.out.tfevents delete mode 100644 src/ml_utils/catboost_info/learn_error.tsv delete mode 100644 src/ml_utils/catboost_info/time_left.tsv diff --git a/src/data_processing/data_utils/__pycache__/split_dataset.cpython-38.pyc b/src/data_processing/data_utils/__pycache__/split_dataset.cpython-38.pyc deleted file mode 100644 index 86954e2e8f64102d35633878ba3b641de24ed572..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5256 zcmaJ_&2J<}74Pb=>FN3Ocd5J*X}Z{se13#d#_);s;>9z z{;<*T4gB8!t-brktA_CpV$T0eFz@1@Ni^KxEHOgevyds?3{BNrp@rT|?2#SXjC8ET z8M&dWXgjHlywFp$lT=53=!157D{uxJ;8^^}XRIQaWi79dO zcjhhQ&%KfZP6?wdyw9_6v3w=yx<0vGisA|1q8 zhWTp#C?6&nye7lEPYPL_Z%!T+^$bagxt>)G0c5La4Cdl$GoN|opD3|}k%2|yGRr3YR_G+c28cJdnedKXZDX-);;q8 z4*M1JJDa77?lBYHoV-*hz6)L`6CP$;IlXHYoLBmUK5RcPIj`iZ^J=MG;XchiKQF0~ zq-R`^)wOI^Jty^egQPQmeEXc#c*di_pY>?)=Xo?19&=w-rGISx!kkrSeqNK+V}{m0 zMqIO+tnubO^RX!cm6MjrNnLA6)-{gVte!7;Q}GRGI=roQ{%kx!+{h!zmbBl6Ojfxe z>%TVFjagIr+`wq_m?^%c^gCLz&{wi$$Xds2A(K_Dqg&bN8OpvbX(sS?Nxr0fbRlh@ z`B1VI$d=Az=lnvmhl5x7?VR&_UcRh+ting<%!iWoAX`3@Nn1M7-L-HIZqF9Gv5UQ8 zWuN56ydgoCd)Aa)wcA$8{nO>N+g6p%O&9A(`#(l2MzhTqiS6^V`Jjcd9yat;Vf9cd_O~tl$8k>GX zmgL%LZ1&+VVY9?veu0h4pJ($&*evr`USQ)q*XFOtXGa<*RGGdxTQ6fWG;(JjeyLXXRpPLwuBuPLHmYcx<%OdT_QJUzB|~0V=%(#k`n(Q?Ss>zw zK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aeD4gRw#&-Zh2vLw9 z0gq7O&mRCe=#gym!jn$-p(p(={uw=SdwAAA?%-KxbK?Z>=8_$-KbVL1UHzzRm{h#_ zC}QGmXoEF3zg4*Up}TzI_&2HG4bsu%oyX*#%DHQphG$H#iUkm5GC0=AQm13y&a1lnrY>ZG7hGd3qZkEILh7xZYr24*n_8ZjyZw-;T2Un|nGDDHwBe`;?chZNYC!feN z-b<(M%l~&H{06~g+h|aAa6s4Ii@alq{ zy38A<_&GdowDmf^4q61%yh05vruv+AB#tx`tWXM*;f~q_p>_McAF1V4AW)TSU7)Ba nD97g>12tKNM7*1$lpiJWJG31$+CXJEIyhFhyr$RpY_Ik|EM9y! diff --git a/src/data_processing/data_utils/__pycache__/utils.cpython-38.pyc b/src/data_processing/data_utils/__pycache__/utils.cpython-38.pyc deleted file mode 100644 index c4dd0b8bb7c09f606f80fb7f8fca60708f788707..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2825 zcmaJ@&2JmW6`$EJF27_+Ruel;+pSX-VNr=qffhj_7*%ZtIk>WGsc^DDu-I@`66xhG zJ2P}Ff-D-_S0gP@pog>oiJp2hl7o{L>EA$I_s~mD26E~#r~cloBr8hVCFaeWk2mw? zef{{GX0yidJ^1dO-G5gZ`-SfH=HF-+4N;1fx+w_?4I-WRb>bhn>? z_tJcCFOeO3-SOvvAzNHUQ-1)_Omk>v&Dg}!Y|I|=iH#m}6KC}5*qPchCV#1&sVn%{ z{*e9EnsLswH?52@p20SESoRZ#Y5#6b-s5ZntBh8#zbdS;d%XV+`zdTVaewE&#olI_ z^%fgDz1qaVO;)ci?2EW}>|A1ask1e@a5WzsbhEvnlg3IVD%kC&NucxK%NIAZAdxbc z!G5fQywe#nh@zq*6P2g;lA_X8W=_)k3#Xgy=7p#Bhq{{< zP6xLY)$8{=$v}7Wtf;&f%M8~SP8RneJBVeHY1Q%y=l0E;J4NG2t!Mz77fVKmOqX|> zsp_@Ooz3Xh=FXd8oOx?@V5R3STDeej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LD0w(S{)}MWuYnV_Q#Nl`p@#*r* zJOL5)uFH$vufsp+$Q$~-%a_3uYT9(|cUa|P+IlsJ76+}I*=Ga1$?pf8+VcVHr*0QR zm~Ne-ukY+3Fy6Zcdb~P9NYj+Gfk4i1(rIC2z zZfWerl90GagQV0$^ns?5v@WMuUV_1_G*d4c`YJO^9fVO@2VOY#d8s9=tX}~$ypnn& zzcfa^7o|3)rZtHErqf;^2Du!s=*s26)aOpqQwQv(@_@Os8duwL6F+qWxvkQcUjS@} zJ1hU=$+6W4H(;eD84%IX-O>ny$S=*rO9gDVv?uPsmy}t8L+6_L7x}_V>#lm?B@Ift zm*P)=IOn{Bq5FS9I8Eul3fX15*wbRv6*A{MH}yF_?_9BNC0g_w&@dkn{GgFp!bwHJG8Agfc#d_ z^NY2VUWE6)U0R73F^{KD!K|*t5^j1}eQLS7E@@ZxNd{Jv7PcWjBdOYpeQ6Z4ap=D! PIhxBKmnu+Ovp4?>!quqc diff --git a/src/data_processing/ml_processing/__pycache__/dataset_processing_module.cpython-38.pyc b/src/data_processing/ml_processing/__pycache__/dataset_processing_module.cpython-38.pyc deleted file mode 100644 index 7502548b40b5bcef9374a8a9a4521c74eb097442..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2079 zcmah~&2Jnv6u0MlKM9+Vwn0LG1ZWT4O%HIYs!EM2P6d%rq*1GpGj_IV!j*pp$yZMO7dY{rr`s$Dsb2Z{z2|4|^UpuO`EfAl5@^4E`P0dtAt8UE zvDsWO?nBpqfZ&8vNpc!fin=46*tMe<`*sZCz>Z-Y!syB<@5CJ&`~T~@ao5K8;vS5i z?B|1cK#8DYctw{VtVp~CeqVl=kK&QtCy?9uPP}9FP=1u}#=H5A_y*Vm-r?O>G``7u zy#I>Cx43gi#=|#|HyKmoeb4G=k3b1zIhzRuTKJ%x7qwMKl`QKdl}zj8m`PTo0s?Na zg2@Y=>Exo6Wx|T0tXZ9vg&sR*_-;~zQ=8p)c9yf5NI0vR7WGl;Ukq#;*y;c=e_uSnx9>53en$8Y=t^7LpC)Xvgvye9aV ztSETyKXDh~B3g8s4p{q(Zta|UOTX!^C=YLuWw0WR^E^*-2o;^PM z_UxO+1;C<5m)_*GnqB%J#SDz9Kv|#HDTRdB4Nv7kKZLILK+GWHr=taJ=#s36@)~+d ze{s&dL-IQTxB@_tXUcd5%LUlZWZwiQrQ|{>M8t}}n`th1#-_SrshDcblRHU$oQM}? zqUX7u7qdH4abDf770Zh0cLzTl-kw*0w6OYAt8|LECzUEwp>fQ}JRsbR(4vEO+Cns6KlL|PbCwFC;GO6!@vJQWP(2P3@Q88f# zq{6d0r8eG6CZ8J*SDHvy66Vfp}OmHQH*3aoy{aZG)|G zKSFn?MQmA8m$q^duoE4t{QZtY-2k+#clMeI!1dPA%CtR7jtUwfxf(`mX*uj$X= z5pf?f7&L>^PUCQRAdpA++M%QwSb`sosY1p+R9hgiHn8(dU+%2AaUxhfS3*xx{Q_ov zxOs6t?pgp;1WObWLqWMD#;LgJ9027WDuCX2xnP9}>k_!0)+R{HB4sdw12-F*{`yZW zA^NuB2yKaFA~i2st!FR4b;ny9b;nM}16yh?MPkF^?X{Ugl~RcBJcozt6qN}oR&b`(7Z7TqmrND#`n4LN zi8X(&<_g(sT(}A2U9eo59vo8&n}b$Z%}kUe_(+n(gusAOz7Ptti@$=>GQp#5RF28N zO3MU4AzI;sh`)Y+^fi#}9l%${(kkA6|Jt@R*sH^3NW_+x_(UyM8=%|bYF~PEw=H$| YuvqC&K_JrY50QSS0rq{m<#vbv0Or+F_y7O^ diff --git a/src/data_processing/ml_processing/__pycache__/image_analysis.cpython-38.pyc b/src/data_processing/ml_processing/__pycache__/image_analysis.cpython-38.pyc deleted file mode 100644 index af030c42b9ac7e2d97a1c04a31e2e913d4d5e4e1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7412 zcma)BO^h7Jb?)l_`Q6zc?s7@mnHY+dNvvf=C$V4%iuhwubi|diq(!kqrO}+~oo%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Wn^8iwj z8~K5`|?IO2jzjkF`BXpdyKY{_&54m01+?jjeMAYSv zmv!!fMQviyxlfE+TeZIpp5)g`%s;V(D#yx4yC?>Ry$k@AGb(qqB6qe(76%_#*6 z)ewz*L}Lg_jbn|kD+;NDP~N5y-DaOzRf6siH6$IH+<|}vqofcTm{aDR1qo4Q98Lj| zCPw*7p!^pQR= 5: + class_id = int(parts[0]) + labels.append(class_names[class_id]) + dict_labels[name_foler] = labels + return dict_labels, labels + + +def gini_coefficient(labels): + unique, counts = np.unique(labels, return_counts=True) + class_counts = dict(zip(unique, counts)) + total_examples = len(labels) + gini = 0 + for label in class_counts: + label_prob = class_counts[label] / total_examples + gini += label_prob * (1 - label_prob) + return gini + + +def calculate_class_imbalance(labels): + class_counts = Counter(labels) + max_count = max(class_counts.values()) + average_count = sum(class_counts.values()) / len(class_counts) + overall_imbalance = max_count / average_count + return overall_imbalance + + +def get_image_size(image_path): + image = cv2.imread(image_path) + if image is not None: + height, width, _ = image.shape + return width, height + return None + + +def analysis_stats(images_path, annotations_path, classes_path, run_path): + class_names = load_class_names(classes_path) + dict_labels, class_labels = load_yolo_labels(annotations_path, class_names) + gini = "{:.2f}".format(gini_coefficient(class_labels)) + plot_class_balance(class_labels, run_path) + dumpCSV(class_names, class_labels, dict_labels, run_path) + imbalance_ratio = calculate_class_imbalance(class_labels) + image_count = len(images_path) + number_of_classes = len(set(class_labels)) + img_w, img_h = get_image_size(images_path[0]) + analysis_results = { + 'W': img_w, + 'H': img_h, + 'Class Imbalance Gini': gini, + 'Class Imbalance Ratio': imbalance_ratio, + 'Number of images': image_count, + 'Number of classes': number_of_classes, + } return analysis_results \ No newline at end of file diff --git a/src/data_processing/ml_processing/dataset_processing_module.py b/src/data_processing/ml_processing/dataset_processing_module.py index da7007f..66d307a 100644 --- a/src/data_processing/ml_processing/dataset_processing_module.py +++ b/src/data_processing/ml_processing/dataset_processing_module.py @@ -12,8 +12,8 @@ file = Path(__file__).resolve() from src.data_processing.ml_processing.plots import plot_class_balance -from src.data_processing.ml_processing.annotation_analysis import analysis_yolo_annotations -from src.data_processing.ml_processing.image_analysis import analysis_stats, analysis_image_dataset +from src.data_processing.ml_processing.annotation_analysis import analysis_yolo_annotations, analysis_stats +from src.data_processing.ml_processing.image_analysis import analysis_image_dataset def find_paths(data_path, image_mode = True): #info_processor older find_image @@ -45,7 +45,6 @@ def feature_extraction(dataset_path, classes_path, run_path): df_dataset_features = pd.concat([df_analyze_color_stats, df_color_stats, df_analyze_annotations, df_analyze_stats], axis=1) df_dataset_features.to_csv(run_path / 'dataset_features.csv', index=False) - return df_dataset_features diff --git a/src/data_processing/ml_processing/image_analysis.py b/src/data_processing/ml_processing/image_analysis.py index b733405..4aefc45 100644 --- a/src/data_processing/ml_processing/image_analysis.py +++ b/src/data_processing/ml_processing/image_analysis.py @@ -1,5 +1,3 @@ -from src.data_processing.data_utils.utils import load_class_names -from src.data_processing.ml_processing.plots import plot_class_balance from collections import Counter from tqdm import tqdm import cv2 @@ -138,66 +136,6 @@ def compute_hist_and_stats(channel, bins=256, range=(0, 256), is_normalized=True return stats_dict -def gini_coefficient(labels): - unique, counts = np.unique(labels, return_counts=True) - class_counts = dict(zip(unique, counts)) - total_examples = len(labels) - gini = 0 - for label in class_counts: - label_prob = class_counts[label] / total_examples - gini += label_prob * (1 - label_prob) - return gini - -def calculate_class_imbalance(labels): - class_counts = Counter(labels) - max_count = max(class_counts.values()) - average_count = sum(class_counts.values()) / len(class_counts) - overall_imbalance = max_count / average_count - return overall_imbalance - - -def get_image_size(image_path): - image = cv2.imread(image_path) - if image is not None: - height, width, _ = image.shape - return width, height - return None - - -def load_yolo_labels(annotations_path, class_names): - """ Загрузка меток классов из YOLO аннотаций. """ - dict_labels = dict() - labels = list() - for filename in annotations_path: - if filename.endswith('.txt'): - with open(filename, 'r') as file: - for line in file: - parts = line.split() - if len(parts) >= 5: - class_id = int(parts[0]) - labels.append(class_names[class_id]) - return labels - -def analysis_stats(images_path, annotations_path, classes_path, run_path): - class_names = load_class_names(classes_path) - class_labels = load_yolo_labels(annotations_path, class_names) - gini = "{:.2f}".format(gini_coefficient(class_labels)) - plot_class_balance(class_labels, run_path) - imbalance_ratio = calculate_class_imbalance(class_labels) - image_count = len(images_path) - number_of_classes = len(set(class_labels)) - img_w, img_h = get_image_size(images_path[0]) - analysis_results = { - 'W': img_w, - 'H': img_h, - 'Class Imbalance Gini': gini, - 'Class Imbalance Ratio': imbalance_ratio, - 'Number of images': image_count, - 'Number of classes': number_of_classes, - } - return analysis_results - - def analysis_image_dataset(images_path): analyze_color_stats = [] diversity_list = [] diff --git a/src/data_processing/ml_processing/plots.py b/src/data_processing/ml_processing/plots.py index e828b20..2fc3b4b 100644 --- a/src/data_processing/ml_processing/plots.py +++ b/src/data_processing/ml_processing/plots.py @@ -21,7 +21,7 @@ def plot_class_balance(labels, output_path): -def plot_with_lines_and_predictions(train_pca, test_pca, train_labels, names_test, predicted_labels, names_train, ax, title, encoder): +def plot_with_lines_and_predictions(train_umap, test_umap, train_labels, names_test, predicted_labels, names_train, ax, title, encoder): unique_labels = np.unique(train_labels) colors = plt.cm.viridis(np.linspace(0, 1, len(unique_labels))) legend_elements = [] @@ -30,7 +30,7 @@ def plot_with_lines_and_predictions(train_pca, test_pca, train_labels, names_tes for k, col in zip(unique_labels, colors): class_member_mask = (train_labels == k) - xy = train_pca[class_member_mask] + xy = train_umap[class_member_mask] ax.scatter(xy[:, 0], xy[:, 1], s=50, c=[col], edgecolor='black', alpha=0.75) if len(xy) > 1: center = np.mean(xy, axis=0) @@ -38,7 +38,7 @@ def plot_with_lines_and_predictions(train_pca, test_pca, train_labels, names_tes circle = plt.Circle(center, radius, color=col, fill=False, lw=2, linestyle='--') ax.add_patch(circle) - for i, point in enumerate(test_pca): + for i, point in enumerate(test_umap): pred_label = predicted_labels[i] color = colors[unique_labels.tolist().index(pred_label)] if pred_label in unique_labels else 'gray' @@ -48,20 +48,18 @@ def plot_with_lines_and_predictions(train_pca, test_pca, train_labels, names_tes bbox_edgecolor = 'black' ax.text(point[0], point[1], names_test, fontsize=9, color='green', ha='center', va='bottom', bbox=dict(boxstyle="round,pad=0.3", facecolor='white', edgecolor=bbox_edgecolor, lw=1)) - train_idx = names_train[names_train == encoder.inverse_transform([pred_label.ravel()])[0]].index[0] + train_idx = names_train[names_train == encoder.inverse_transform(pred_label)[0]].index[0] - train_point = train_pca[train_idx] + train_point = train_umap[train_idx] ax.plot([point[0], train_point[0]], [point[1], train_point[1]], 'k--', linewidth=1) ax.text(train_point[0], train_point[1], names_train.iloc[train_idx], fontsize=9, color='black', ha='right', va='top') true_patch = mpatches.Patch(edgecolor='black', facecolor='white', label='True', lw=1) - false_patch = mpatches.Patch(edgecolor='red', facecolor='white', label='False', lw=1) legend_elements.append(true_patch) - legend_elements.append(false_patch) ax.set_title(title) - ax.set_xlabel('PCA 1') - ax.set_ylabel('PCA 2') + ax.set_xlabel('UMAP 1') + ax.set_ylabel('UMAP 2') ax.legend(handles=legend_elements, loc='upper right', fontsize='small') diff --git a/src/data_processing/ml_processing/recommendation_module.py b/src/data_processing/ml_processing/recommendation_module.py index c16291e..ca3ebca 100644 --- a/src/data_processing/ml_processing/recommendation_module.py +++ b/src/data_processing/ml_processing/recommendation_module.py @@ -9,10 +9,9 @@ def ml_predict(df_rules, df_dataset_features, run_path): - scaler = StandardScaler() encoder = LabelEncoder() - mds = umap.UMAP(random_state=42) + mds = umap.UMAP() cols_to_drop = [col for col in df_rules.columns if col.startswith(('Min', 'Max'))] df_rules = df_rules.drop(columns=cols_to_drop) @@ -28,10 +27,10 @@ def ml_predict(df_rules, df_dataset_features, run_path): X_train = scaler.fit_transform(X_train) X_test = scaler.transform(X_test) - y_train = encoder.fit_transform(y_train) + y_train = encoder.fit_transform(y_train.values.ravel()) - X_pca = mds.fit_transform(X_train) # for plot - X_pca_test = mds.transform(X_test) # for plot + X_umap = mds.fit_transform(X_train) # for plot + X_umap_test = mds.transform(X_test) # for plot train_dataset_names = df_rules['Dataset'] model = cat.CatBoostClassifier(iterations=100, learning_rate=0.1, random_strength=6, verbose=0) @@ -41,7 +40,7 @@ def ml_predict(df_rules, df_dataset_features, run_path): fig, ax = plt.subplots(nrows=1, ncols=1, figsize=(12, 6)) - plot_with_lines_and_predictions(X_pca, X_pca_test, y_train, "Current Dataset", y_pred, train_dataset_names, ax, 'ML Predictions', encoder) + plot_with_lines_and_predictions(X_umap, X_umap_test, y_train, "Current Dataset", y_pred, train_dataset_names, ax, 'ML Predictions', encoder) plt.savefig(run_path / "Prediction_ml.png") return encoder.inverse_transform(y_pred.ravel())[0] diff --git a/src/ml_utils/catboost_info/catboost_training.json b/src/ml_utils/catboost_info/catboost_training.json deleted file mode 100644 index 5975cf3..0000000 --- a/src/ml_utils/catboost_info/catboost_training.json +++ /dev/null @@ -1,104 +0,0 @@ -{ -"meta":{"test_sets":[],"test_metrics":[],"learn_metrics":[{"best_value":"Min","name":"MultiClass"}],"launch_mode":"Train","parameters":"","iteration_count":100,"learn_sets":["learn"],"name":"experiment"}, -"iterations":[ -{"learn":[2.966908289],"iteration":0,"passed_time":0.04904187426,"remaining_time":4.855145552}, -{"learn":[2.940654061],"iteration":1,"passed_time":0.05042520908,"remaining_time":2.470835245}, -{"learn":[2.912024752],"iteration":2,"passed_time":0.05150003737,"remaining_time":1.665167875}, -{"learn":[2.883709917],"iteration":3,"passed_time":0.05298099669,"remaining_time":1.27154392}, -{"learn":[2.85632533],"iteration":4,"passed_time":0.05396055399,"remaining_time":1.025250526}, -{"learn":[2.830958245],"iteration":5,"passed_time":0.05954238594,"remaining_time":0.932830713}, -{"learn":[2.804914143],"iteration":6,"passed_time":0.06055881367,"remaining_time":0.8045670959}, -{"learn":[2.776208792],"iteration":7,"passed_time":0.06163020694,"remaining_time":0.7087473798}, -{"learn":[2.748509796],"iteration":8,"passed_time":0.06295401699,"remaining_time":0.6365350607}, -{"learn":[2.720849656],"iteration":9,"passed_time":0.06409251543,"remaining_time":0.5768326389}, -{"learn":[2.691786833],"iteration":10,"passed_time":0.06540314573,"remaining_time":0.5291709064}, -{"learn":[2.663807026],"iteration":11,"passed_time":0.06647217357,"remaining_time":0.4874626062}, -{"learn":[2.636778494],"iteration":12,"passed_time":0.06752107691,"remaining_time":0.4518718224}, -{"learn":[2.609809542],"iteration":13,"passed_time":0.06865394871,"remaining_time":0.4217313992}, -{"learn":[2.582697231],"iteration":14,"passed_time":0.06997307435,"remaining_time":0.396514088}, -{"learn":[2.554950314],"iteration":15,"passed_time":0.07101985072,"remaining_time":0.3728542163}, -{"learn":[2.526890213],"iteration":16,"passed_time":0.07206767599,"remaining_time":0.3518598298}, -{"learn":[2.501069398],"iteration":17,"passed_time":0.07330751822,"remaining_time":0.3339564719}, -{"learn":[2.474177295],"iteration":18,"passed_time":0.07473993276,"remaining_time":0.3186281344}, -{"learn":[2.446392249],"iteration":19,"passed_time":0.07585703222,"remaining_time":0.3034281289}, -{"learn":[2.424266845],"iteration":20,"passed_time":0.07651652005,"remaining_time":0.2878478611}, -{"learn":[2.397496976],"iteration":21,"passed_time":0.07795154789,"remaining_time":0.2763736698}, -{"learn":[2.37131152],"iteration":22,"passed_time":0.07908579426,"remaining_time":0.2647654851}, -{"learn":[2.345200319],"iteration":23,"passed_time":0.08026071194,"remaining_time":0.2541589212}, -{"learn":[2.319186643],"iteration":24,"passed_time":0.0812455542,"remaining_time":0.2437366626}, -{"learn":[2.294591178],"iteration":25,"passed_time":0.08233161224,"remaining_time":0.2343284348}, -{"learn":[2.270196296],"iteration":26,"passed_time":0.08345744361,"remaining_time":0.2256441994}, -{"learn":[2.243926793],"iteration":27,"passed_time":0.08446743928,"remaining_time":0.2172019867}, -{"learn":[2.219110885],"iteration":28,"passed_time":0.08541162059,"remaining_time":0.209111209}, -{"learn":[2.194769504],"iteration":29,"passed_time":0.0864402115,"remaining_time":0.2016938268}, -{"learn":[2.170372862],"iteration":30,"passed_time":0.08740896546,"remaining_time":0.1945554393}, -{"learn":[2.145714872],"iteration":31,"passed_time":0.08835110169,"remaining_time":0.1877460911}, -{"learn":[2.120739164],"iteration":32,"passed_time":0.08937475812,"remaining_time":0.1814578422}, -{"learn":[2.098588491],"iteration":33,"passed_time":0.09074909464,"remaining_time":0.1761600072}, -{"learn":[2.074782421],"iteration":34,"passed_time":0.09193577765,"remaining_time":0.1707378728}, -{"learn":[2.050676221],"iteration":35,"passed_time":0.09294543886,"remaining_time":0.1652363358}, -{"learn":[2.026457519],"iteration":36,"passed_time":0.09404825445,"remaining_time":0.160136217}, -{"learn":[2.002237695],"iteration":37,"passed_time":0.0952013935,"remaining_time":0.1553285894}, -{"learn":[1.981042395],"iteration":38,"passed_time":0.09636856667,"remaining_time":0.1507303222}, -{"learn":[1.957374204],"iteration":39,"passed_time":0.09725019576,"remaining_time":0.1458752936}, -{"learn":[1.93451548],"iteration":40,"passed_time":0.09827483551,"remaining_time":0.1414198852}, -{"learn":[1.912541077],"iteration":41,"passed_time":0.09894371884,"remaining_time":0.1366365641}, -{"learn":[1.888674757],"iteration":42,"passed_time":0.1002688288,"remaining_time":0.132914494}, -{"learn":[1.86586878],"iteration":43,"passed_time":0.1013062423,"remaining_time":0.1289352175}, -{"learn":[1.844500021],"iteration":44,"passed_time":0.1023582613,"remaining_time":0.1251045415}, -{"learn":[1.822683131],"iteration":45,"passed_time":0.1034306291,"remaining_time":0.1214185646}, -{"learn":[1.800248886],"iteration":46,"passed_time":0.1045867777,"remaining_time":0.1179382812}, -{"learn":[1.778120885],"iteration":47,"passed_time":0.1056100799,"remaining_time":0.1144109199}, -{"learn":[1.756273059],"iteration":48,"passed_time":0.1068283678,"remaining_time":0.1111887094}, -{"learn":[1.735586602],"iteration":49,"passed_time":0.1078636776,"remaining_time":0.1078636776}, -{"learn":[1.715062282],"iteration":50,"passed_time":0.1089454393,"remaining_time":0.1046730691}, -{"learn":[1.693727662],"iteration":51,"passed_time":0.1099166607,"remaining_time":0.1014615329}, -{"learn":[1.672361239],"iteration":52,"passed_time":0.1108532142,"remaining_time":0.09830379371}, -{"learn":[1.65234775],"iteration":53,"passed_time":0.1117991218,"remaining_time":0.09523628893}, -{"learn":[1.632071584],"iteration":54,"passed_time":0.1126996097,"remaining_time":0.09220877155}, -{"learn":[1.612059909],"iteration":55,"passed_time":0.1136179561,"remaining_time":0.0892712512}, -{"learn":[1.591689818],"iteration":56,"passed_time":0.1145139826,"remaining_time":0.08638774128}, -{"learn":[1.572223116],"iteration":57,"passed_time":0.11542727,"remaining_time":0.08358526447}, -{"learn":[1.552815227],"iteration":58,"passed_time":0.1166577192,"remaining_time":0.0810672286}, -{"learn":[1.53291167],"iteration":59,"passed_time":0.1178794974,"remaining_time":0.0785863316}, -{"learn":[1.513848279],"iteration":60,"passed_time":0.1190219608,"remaining_time":0.07609600773}, -{"learn":[1.496162906],"iteration":61,"passed_time":0.1201847517,"remaining_time":0.07366162201}, -{"learn":[1.476537271],"iteration":62,"passed_time":0.1214375559,"remaining_time":0.07132046936}, -{"learn":[1.45771821],"iteration":63,"passed_time":0.1224871477,"remaining_time":0.06889902057}, -{"learn":[1.438772748],"iteration":64,"passed_time":0.123586676,"remaining_time":0.0665466717}, -{"learn":[1.420161013],"iteration":65,"passed_time":0.1246922473,"remaining_time":0.06423540014}, -{"learn":[1.402105252],"iteration":66,"passed_time":0.1256634825,"remaining_time":0.06189395407}, -{"learn":[1.383947151],"iteration":67,"passed_time":0.1266773914,"remaining_time":0.05961289006}, -{"learn":[1.366296227],"iteration":68,"passed_time":0.1275943855,"remaining_time":0.05732501377}, -{"learn":[1.3482302],"iteration":69,"passed_time":0.1285656834,"remaining_time":0.0550995786}, -{"learn":[1.331782016],"iteration":70,"passed_time":0.1294772106,"remaining_time":0.05288505784}, -{"learn":[1.315121226],"iteration":71,"passed_time":0.1303558499,"remaining_time":0.05069394161}, -{"learn":[1.299053364],"iteration":72,"passed_time":0.1311985145,"remaining_time":0.04852547796}, -{"learn":[1.283313899],"iteration":73,"passed_time":0.1320718927,"remaining_time":0.04640363796}, -{"learn":[1.268011408],"iteration":74,"passed_time":0.1329490698,"remaining_time":0.04431635661}, -{"learn":[1.252289668],"iteration":75,"passed_time":0.1338616578,"remaining_time":0.04227210247}, -{"learn":[1.237714588],"iteration":76,"passed_time":0.1349227093,"remaining_time":0.04030158849}, -{"learn":[1.223563425],"iteration":77,"passed_time":0.1357692241,"remaining_time":0.03829388371}, -{"learn":[1.212466933],"iteration":78,"passed_time":0.1363877714,"remaining_time":0.0362549772}, -{"learn":[1.200965318],"iteration":79,"passed_time":0.1372662597,"remaining_time":0.03431656494}, -{"learn":[1.191129407],"iteration":80,"passed_time":0.1381544602,"remaining_time":0.03240660177}, -{"learn":[1.175682781],"iteration":81,"passed_time":0.1390073185,"remaining_time":0.03051380163}, -{"learn":[1.161150016],"iteration":82,"passed_time":0.1398863783,"remaining_time":0.02865142687}, -{"learn":[1.148310432],"iteration":83,"passed_time":0.1407099996,"remaining_time":0.02680190469}, -{"learn":[1.134652712],"iteration":84,"passed_time":0.1416470373,"remaining_time":0.02499653599}, -{"learn":[1.122143157],"iteration":85,"passed_time":0.1426140982,"remaining_time":0.02321624854}, -{"learn":[1.109578019],"iteration":86,"passed_time":0.1436021819,"remaining_time":0.02145779729}, -{"learn":[1.096904072],"iteration":87,"passed_time":0.1445725213,"remaining_time":0.01971443472}, -{"learn":[1.083257843],"iteration":88,"passed_time":0.1454650893,"remaining_time":0.01797883126}, -{"learn":[1.077461082],"iteration":89,"passed_time":0.1460111059,"remaining_time":0.01622345621}, -{"learn":[1.070491121],"iteration":90,"passed_time":0.1469294727,"remaining_time":0.01453148631}, -{"learn":[1.062475092],"iteration":91,"passed_time":0.1478028766,"remaining_time":0.01285242405}, -{"learn":[1.050509746],"iteration":92,"passed_time":0.1486683926,"remaining_time":0.01119009407}, -{"learn":[1.038271794],"iteration":93,"passed_time":0.1495912926,"remaining_time":0.009548380378}, -{"learn":[1.03086171],"iteration":94,"passed_time":0.1504020687,"remaining_time":0.00791589835}, -{"learn":[1.018494625],"iteration":95,"passed_time":0.1512270627,"remaining_time":0.006301127613}, -{"learn":[1.009644597],"iteration":96,"passed_time":0.1517964813,"remaining_time":0.004694736537}, -{"learn":[1.002272649],"iteration":97,"passed_time":0.1526986635,"remaining_time":0.003116299256}, -{"learn":[0.9959261505],"iteration":98,"passed_time":0.1537415192,"remaining_time":0.001552944638}, -{"learn":[0.9839061674],"iteration":99,"passed_time":0.1548659352,"remaining_time":0} -]} \ No newline at end of file diff --git a/src/ml_utils/catboost_info/learn/events.out.tfevents b/src/ml_utils/catboost_info/learn/events.out.tfevents deleted file mode 100644 index 29331ed621e46ede671dfc96de7e292464257253..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5998 zcmZ|TYfx2H6bJB&BFIA#6#+p(o?gVu%ZrGYhavB0`9Lr+d}JyzHmKm}5Qu`Nl9vPm zMa4|O1P8?gyryt@3Ly=}1c-7oF-ajq#tf1^)HJU7uX8@0ncw{P?6cS2dmTH`zfak5 z`G}TCbf=^}yK9-9nf4rQ?a;ebf`SM-QRj~*1FQd{y+J$tkw5_IZX|0 zsf&!*{mz!Dyqy5HAjX~8knRU#yqyTPBGZjn&7kOYyj2IQ)#gfUiRyww1EBh7`_RB8Si-fDvVsMLwrhymMr-cAOa^TdJJ4L4mic&i0=i-m;P6vuo= z-fDxD`Pmb@&BU&iw>n_k_t_Df-X2oQTV1fDcjgm&TRrSc-cA8)rfEy;&c_`~csmvB z(;#bNdsM$#@>UOQ*g;ET>uOTMcsmVjR^>cm8%MeX=2;)?A$@aVr=K%-=5wcmeYR#U zv1eD_QseCmu;p@7V!!Qe5ZH5Of_1btAvWVf(>;8y0odG~#>DDejd;M@SzzT#Lt<}j z8L!~2Ay}p1EMl+s_9=O51U7TWOk(@G+@pDG3^u!aIiN~u$Qbv#O~R4B9FH=U|X~P_ImrCvp7(i%v)Qq9!LKo)$aD~z7C$;$Xh$GMt5EitCXjI&D#ZF@BT1Itd7;8*Sxg{ zd(!9`v7MWH1|V9P?E5-Sypf8%o{U^CU@L4N5Sy!11@hJztT>~G*eGKIQ{K9O)o=ZY*a^#y3+z{mzz*qk6057& zEs!e(Ymw4H>=8xkF@DUhV5^?A6Wg>mT%Z;fgB^`*Blhzbvdw(18`xw;3$ah@#%g%G z1neo#W@38+RJ(ZV4)$Vg1F@w#%dhZuDcA(pI$~GPq6mm3SuLbLsh)>0-KgoO>B`gIDog_V6TfSiLEbq{ED~OJ9jo-CpPYW zgg~$H4&*u{T_bjQ>8@Bl*9WY`x}4b8A>Aiq zOW1j0y}SDa?$5zsHG|I)+p@5C0iPQJHh#w$Vq=>E`*|A*wz}Xnu{)-UZt*q@>|Ezl z#O4mw#ql;A?9!?{Vm%)9B=R-_?BJd+h>i3edC1#$!8YvAA$ImxHKV+J5A2C^CyCX) zTVBN56<|9@vxq(XP^9ARO0c0aIk8*!dkWOiDzF>Re@3j_q~ju=yBchfMkcWyCNl-T zZzS00Eysu*n{!X#pW7O+PQ{-RTNt4dIFF*hdJP;Q_Ck`Ez&$4#Z1*H;OX3X#_Sm&x z9mX?AZrRnLz5G1C4|aB9I%mTr zIY8{2%g1bZ`vF)jSt_wj6~zMmek|CepcG=)2Wtw{?*_2yBgw?pHE&Jj$Gj1&pK2em J+j7+m{s9LNw9Wtk diff --git a/src/ml_utils/catboost_info/learn_error.tsv b/src/ml_utils/catboost_info/learn_error.tsv deleted file mode 100644 index 0879f7f..0000000 --- a/src/ml_utils/catboost_info/learn_error.tsv +++ /dev/null @@ -1,101 +0,0 @@ -iter MultiClass -0 2.966908289 -1 2.940654061 -2 2.912024752 -3 2.883709917 -4 2.85632533 -5 2.830958245 -6 2.804914143 -7 2.776208792 -8 2.748509796 -9 2.720849656 -10 2.691786833 -11 2.663807026 -12 2.636778494 -13 2.609809542 -14 2.582697231 -15 2.554950314 -16 2.526890213 -17 2.501069398 -18 2.474177295 -19 2.446392249 -20 2.424266845 -21 2.397496976 -22 2.37131152 -23 2.345200319 -24 2.319186643 -25 2.294591178 -26 2.270196296 -27 2.243926793 -28 2.219110885 -29 2.194769504 -30 2.170372862 -31 2.145714872 -32 2.120739164 -33 2.098588491 -34 2.074782421 -35 2.050676221 -36 2.026457519 -37 2.002237695 -38 1.981042395 -39 1.957374204 -40 1.93451548 -41 1.912541077 -42 1.888674757 -43 1.86586878 -44 1.844500021 -45 1.822683131 -46 1.800248886 -47 1.778120885 -48 1.756273059 -49 1.735586602 -50 1.715062282 -51 1.693727662 -52 1.672361239 -53 1.65234775 -54 1.632071584 -55 1.612059909 -56 1.591689818 -57 1.572223116 -58 1.552815227 -59 1.53291167 -60 1.513848279 -61 1.496162906 -62 1.476537271 -63 1.45771821 -64 1.438772748 -65 1.420161013 -66 1.402105252 -67 1.383947151 -68 1.366296227 -69 1.3482302 -70 1.331782016 -71 1.315121226 -72 1.299053364 -73 1.283313899 -74 1.268011408 -75 1.252289668 -76 1.237714588 -77 1.223563425 -78 1.212466933 -79 1.200965318 -80 1.191129407 -81 1.175682781 -82 1.161150016 -83 1.148310432 -84 1.134652712 -85 1.122143157 -86 1.109578019 -87 1.096904072 -88 1.083257843 -89 1.077461082 -90 1.070491121 -91 1.062475092 -92 1.050509746 -93 1.038271794 -94 1.03086171 -95 1.018494625 -96 1.009644597 -97 1.002272649 -98 0.9959261505 -99 0.9839061674 diff --git a/src/ml_utils/catboost_info/time_left.tsv b/src/ml_utils/catboost_info/time_left.tsv deleted file mode 100644 index 64a5b7e..0000000 --- a/src/ml_utils/catboost_info/time_left.tsv +++ /dev/null @@ -1,101 +0,0 @@ -iter Passed Remaining -0 49 4855 -1 50 2470 -2 51 1665 -3 52 1271 -4 53 1025 -5 59 932 -6 60 804 -7 61 708 -8 62 636 -9 64 576 -10 65 529 -11 66 487 -12 67 451 -13 68 421 -14 69 396 -15 71 372 -16 72 351 -17 73 333 -18 74 318 -19 75 303 -20 76 287 -21 77 276 -22 79 264 -23 80 254 -24 81 243 -25 82 234 -26 83 225 -27 84 217 -28 85 209 -29 86 201 -30 87 194 -31 88 187 -32 89 181 -33 90 176 -34 91 170 -35 92 165 -36 94 160 -37 95 155 -38 96 150 -39 97 145 -40 98 141 -41 98 136 -42 100 132 -43 101 128 -44 102 125 -45 103 121 -46 104 117 -47 105 114 -48 106 111 -49 107 107 -50 108 104 -51 109 101 -52 110 98 -53 111 95 -54 112 92 -55 113 89 -56 114 86 -57 115 83 -58 116 81 -59 117 78 -60 119 76 -61 120 73 -62 121 71 -63 122 68 -64 123 66 -65 124 64 -66 125 61 -67 126 59 -68 127 57 -69 128 55 -70 129 52 -71 130 50 -72 131 48 -73 132 46 -74 132 44 -75 133 42 -76 134 40 -77 135 38 -78 136 36 -79 137 34 -80 138 32 -81 139 30 -82 139 28 -83 140 26 -84 141 24 -85 142 23 -86 143 21 -87 144 19 -88 145 17 -89 146 16 -90 146 14 -91 147 12 -92 148 11 -93 149 9 -94 150 7 -95 151 6 -96 151 4 -97 152 3 -98 153 1 -99 154 0 diff --git a/src/train_utils/config/train_config.yaml b/src/train_utils/config/train_config.yaml index 73b1357..effda01 100644 --- a/src/train_utils/config/train_config.yaml +++ b/src/train_utils/config/train_config.yaml @@ -2,7 +2,7 @@ BATCH_SIZE: 20 CLASSES: classes.txt DATA_PATH: /home/runner/work/ODRS/ODRS/user_datasets/WaRP/Warp-D EPOCHS: 1 -GPU_COUNT: 1 +GPU_COUNT: 0 IMG_SIZE: 300 MODEL: yolov8s SELECT_GPU: cpu diff --git a/src/train_utils/train_models/scripts/yolov5_train.py b/src/train_utils/train_models/scripts/yolov5_train.py index d7207f9..7337e68 100644 --- a/src/train_utils/train_models/scripts/yolov5_train.py +++ b/src/train_utils/train_models/scripts/yolov5_train.py @@ -1,5 +1,7 @@ import os from pathlib import Path +import hashlib +from datetime import datetime def train_V5(IMG_SIZE, BATCH_SIZE, EPOCHS, CONFIG_PATH, MODEL_PATH, GPU_COUNT, SELECT_GPU): @@ -15,7 +17,10 @@ def train_V5(IMG_SIZE, BATCH_SIZE, EPOCHS, CONFIG_PATH, MODEL_PATH, GPU_COUNT, S :param GPU_COUNT: Number of video cards. """ file = Path(__file__).resolve() - command = "python3" if GPU_COUNT == 0 else f"OMP_NUM_THREADS=1 python3 -m torch.distributed.run --nproc_per_node {GPU_COUNT}" + now = datetime.now().strftime("%Y%m%d%H%M%S") + hash_value = int(hashlib.md5(now.encode()).hexdigest(), 16) % 100000 + + command = "python3" if GPU_COUNT == 0 else f"OMP_NUM_THREADS=1 python3 -m torch.distributed.run --nproc_per_node {GPU_COUNT} --master_port={hash_value:05d}" train_script_path = str(Path(file.parents[1]) / 'models' / 'yolov5' / 'train.py') diff --git a/src/train_utils/train_models/scripts/yolov7_train.py b/src/train_utils/train_models/scripts/yolov7_train.py index 7adbbec..384823f 100644 --- a/src/train_utils/train_models/scripts/yolov7_train.py +++ b/src/train_utils/train_models/scripts/yolov7_train.py @@ -1,5 +1,7 @@ import os from pathlib import Path +import hashlib +from datetime import datetime def train_V7(IMG_SIZE, BATCH_SIZE, EPOCHS, CONFIG_PATH, MODEL_PATH, GPU_COUNT, SELECT_GPU): @@ -13,8 +15,10 @@ def train_V7(IMG_SIZE, BATCH_SIZE, EPOCHS, CONFIG_PATH, MODEL_PATH, GPU_COUNT, S :param MODEL_PATH: Path to the model file (yaml). """ file = Path(__file__).resolve() + now = datetime.now().strftime("%Y%m%d%H%M%S") + hash_value = int(hashlib.md5(now.encode()).hexdigest(), 16) % 100000 - command = "python3" if not GPU_COUNT else f"OMP_NUM_THREADS=1 python3 -m torch.distributed.launch --nproc_per_node {GPU_COUNT}" + command = "python3" if not GPU_COUNT else f"OMP_NUM_THREADS=1 python3 -m torch.distributed.launch --nproc_per_node {GPU_COUNT} --master_port={hash_value:05d}" train_script_path = str(Path(file.parents[1]) / 'models' / 'yolov7' / 'train.py') full_command = ( command +