Skip to content

Commit

Permalink
Fixups
Browse files Browse the repository at this point in the history
  - Deprecations - display correct long argument
  - Minor spelling + linting
  • Loading branch information
torzdf committed Apr 21, 2024
1 parent dce7d98 commit 696692d
Show file tree
Hide file tree
Showing 11 changed files with 33 additions and 33 deletions.
24 changes: 12 additions & 12 deletions lib/cli/args_extract_convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def get_argument_list() -> list[dict[str, T.Any]]:
"action": FileFullPaths,
"filetypes": "alignments",
"type": str,
"dest": "depr_alignments_path_al_p",
"dest": "depr_alignments_al_p",
"help": argparse.SUPPRESS})
return argument_list

Expand Down Expand Up @@ -391,12 +391,12 @@ def get_optional_arguments() -> list[dict[str, T.Any]]:
argument_list.append({
"opts": ("-min", ),
"type": int,
"dest": "depr_min_size_min_m",
"dest": "depr_min-size_min_m",
"help": argparse.SUPPRESS})
argument_list.append({
"opts": ("-een", ),
"type": int,
"dest": "depr_extract_every_n_een_N",
"dest": "depr_extract-every-n_een_N",
"help": argparse.SUPPRESS})
argument_list.append({
"opts": ("-nm",),
Expand All @@ -407,7 +407,7 @@ def get_optional_arguments() -> list[dict[str, T.Any]]:
argument_list.append({
"opts": ("-rf", ),
"type": int,
"dest": "depr_re_feed_rf_R",
"dest": "depr_re-feed_rf_R",
"help": argparse.SUPPRESS})
argument_list.append({
"opts": ("-sz", ),
Expand All @@ -417,12 +417,12 @@ def get_optional_arguments() -> list[dict[str, T.Any]]:
argument_list.append({
"opts": ("-si", ),
"type": int,
"dest": "depr_save_interval_si_v",
"dest": "depr_save-interval_si_v",
"help": argparse.SUPPRESS})
argument_list.append({
"opts": ("-dl", ),
"action": "store_true",
"dest": "depr_debug_landmarks_dl_B",
"dest": "depr_debug-landmarks_dl_B",
"help": argparse.SUPPRESS})
argument_list.append({
"opts": ("-sp", ),
Expand All @@ -432,12 +432,12 @@ def get_optional_arguments() -> list[dict[str, T.Any]]:
argument_list.append({
"opts": ("-sf", ),
"action": "store_true",
"dest": "depr_skip_faces_sf_e",
"dest": "depr_skip-existing-faces_sf_e",
"help": argparse.SUPPRESS})
argument_list.append({
"opts": ("-ssf", ),
"action": "store_true",
"dest": "depr_skip_saving_faces_ssf_K",
"dest": "depr_skip-saving-faces_ssf_K",
"help": argparse.SUPPRESS})
return argument_list

Expand Down Expand Up @@ -726,22 +726,22 @@ def get_optional_arguments() -> list[dict[str, T.Any]]:
argument_list.append({
"opts": ("-ref", ),
"type": str,
"dest": "depr_reference_video_ref_r",
"dest": "depr_reference-video_ref_r",
"help": argparse.SUPPRESS})
argument_list.append({
"opts": ("-fr", ),
"type": str,
"nargs": "+",
"dest": "depr_frame_ranges_fr_R",
"dest": "depr_frame-ranges_fr_R",
"help": argparse.SUPPRESS})
argument_list.append({
"opts": ("-osc", ),
"type": int,
"dest": "depr_output_scale_osc_O",
"dest": "depr_output-scale_osc_O",
"help": argparse.SUPPRESS})
argument_list.append({
"opts": ("-otf", ),
"action": "store_true",
"dest": "depr_on_the_fly_otf_T",
"dest": "depr_on-the-fly_otf_T",
"help": argparse.SUPPRESS})
return argument_list
20 changes: 10 additions & 10 deletions lib/cli/args_train.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ def get_argument_list() -> list[dict[str, T.Any]]:
argument_list.append({
"opts": ("-bs", ),
"type": int,
"dest": "depr_batch_size_bs_b",
"dest": "depr_batch-size_bs_b",
"help": argparse.SUPPRESS})
argument_list.append({
"opts": ("-it", ),
Expand All @@ -337,46 +337,46 @@ def get_argument_list() -> list[dict[str, T.Any]]:
argument_list.append({
"opts": ("-nl", ),
"action": "store_true",
"dest": "depr_no_logs_nl_n",
"dest": "depr_no-logs_nl_n",
"help": argparse.SUPPRESS})
argument_list.append({
"opts": ("-ss", ),
"type": int,
"dest": "depr_snapshot_interval_ss_I",
"dest": "depr_snapshot-interval_ss_I",
"help": argparse.SUPPRESS})
argument_list.append({
"opts": ("-tia", ),
"type": str,
"dest": "depr_timelapse_input_a_tia_x",
"dest": "depr_timelapse-input-A_tia_x",
"help": argparse.SUPPRESS})
argument_list.append({
"opts": ("-tib", ),
"type": str,
"dest": "depr_timelapse_input_b_tib_y",
"dest": "depr_timelapse-input-B_tib_y",
"help": argparse.SUPPRESS})
argument_list.append({
"opts": ("-to", ),
"type": str,
"dest": "depr_timelapse_output_to_z",
"dest": "depr_timelapse-output_to_z",
"help": argparse.SUPPRESS})
argument_list.append({
"opts": ("-wl", ),
"action": "store_true",
"dest": "depr_warp_to_landmarks_wl_M",
"dest": "depr_warp-to-landmarks_wl_M",
"help": argparse.SUPPRESS})
argument_list.append({
"opts": ("-nf", ),
"action": "store_true",
"dest": "depr_no_flip_nf_P",
"dest": "depr_no-flip_nf_P",
"help": argparse.SUPPRESS})
argument_list.append({
"opts": ("-nac", ),
"action": "store_true",
"dest": "depr_no_augment_color_nac_c",
"dest": "depr_no-augment-color_nac_c",
"help": argparse.SUPPRESS})
argument_list.append({
"opts": ("-nw", ),
"action": "store_true",
"dest": "depr_no_warp_nw_W",
"dest": "depr_no-warp_nw_W",
"help": argparse.SUPPRESS})
return argument_list
2 changes: 1 addition & 1 deletion lib/training/augmentation.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class AugConstants: # pylint:disable=too-many-instance-attributes,too-few-publi
----------
config: dict[str, ConfigValueType]
The user training configuration options
pricessing_size: int:
processing_size: int:
The size of image to augment the data for
batch_size: int
The batch size that augmented data is being prepared for
Expand Down
2 changes: 1 addition & 1 deletion plugins/train/trainer/_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,7 @@ def _resize_sample(cls,
logger.debug("Resizing sample: (side: '%s', sample.shape: %s, target_size: %s, scale: %s)",
side, sample.shape, target_size, scale)
interpn = cv2.INTER_CUBIC if scale > 1.0 else cv2.INTER_AREA
retval = np.array([cv2.resize(img, (target_size, target_size), interpn)
retval = np.array([cv2.resize(img, (target_size, target_size), interpolation=interpn)
for img in sample])
logger.debug("Resized sample: (side: '%s' shape: %s)", side, retval.shape)
return retval
Expand Down
2 changes: 1 addition & 1 deletion scripts/fsmedia.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def finalize(images_found: int, num_faces_detected: int, verify_output: bool) ->
logger.info("Double check your results.")
logger.info("-------------------------")

logger.info("Process Succesfully Completed. Shutting Down...")
logger.info("Process Successfully Completed. Shutting Down...")


class Alignments(AlignmentsBase):
Expand Down
6 changes: 3 additions & 3 deletions tools/alignments/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,17 +208,17 @@ def get_argument_list() -> list[dict[str, T.Any]]:
argument_list.append({
"opts": ("-fc", ),
"type": str,
"dest": "depr_faces_dir_fc_c",
"dest": "depr_faces_folder_fc_c",
"help": argparse.SUPPRESS})
argument_list.append({
"opts": ("-fr", ),
"type": str,
"dest": "depr_extract_every_n_een_N",
"dest": "depr_extract-every-n_een_N",
"help": argparse.SUPPRESS})
argument_list.append({
"opts": ("-een", ),
"type": int,
"dest": "depr_frames_dir_fr_r",
"dest": "depr_faces_folder_fr_r",
"help": argparse.SUPPRESS})
argument_list.append({
"opts": ("-sz", ),
Expand Down
2 changes: 1 addition & 1 deletion tools/effmpeg/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ def get_argument_list():
"opts": ("-ef", ),
"type": str,
"choices": IMAGE_EXTENSIONS,
"dest": "depr_extract_ext_et_E",
"dest": "depr_extract-filetype_et_E",
"help": argparse.SUPPRESS})
argument_list.append({
"opts": ('-tr', ),
Expand Down
2 changes: 1 addition & 1 deletion tools/manual/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def get_argument_list():
argument_list.append({
"opts": ("-al", ),
"type": str,
"dest": "depr_alignments_path_al_a",
"dest": "depr_alignments_al_a",
"help": argparse.SUPPRESS})
argument_list.append({
"opts": ("-fr", ),
Expand Down
2 changes: 1 addition & 1 deletion tools/mask/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,6 @@ def get_argument_list():
argument_list.append({
"opts": ("-it", ),
"type": str,
"dest": "depr_input_type_it_I",
"dest": "depr_input-type_it_I",
"help": argparse.SUPPRESS})
return argument_list
2 changes: 1 addition & 1 deletion tools/preview/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,6 @@ def get_argument_list() -> list[dict[str, T.Any]]:
argument_list.append({
"opts": ("-al", ),
"type": str,
"dest": "depr_alignments_path_al_a",
"dest": "depr_alignments_al_a",
"help": argparse.SUPPRESS})
return argument_list
2 changes: 1 addition & 1 deletion tools/sort/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,6 @@ def get_argument_list():
argument_list.append({
"opts": ("-lf", ),
"type": str,
"dest": "depr_log_file_path_lf_f",
"dest": "depr_log-file_lf_f",
"help": argparse.SUPPRESS})
return argument_list

0 comments on commit 696692d

Please sign in to comment.