Ruxx Tag Companion Script (RTCS)版本v2.0 (ID: 542161)

Ruxx Tag Companion Script (RTCS)版本v2.0 (ID: 542161)

This script is made for use with the Ruxx rule34 downloader!

I'll cut to the chase. This script separates the tags master file, that is generated when downloading images using Ruxx, into separate text files with the same names as the image files they correspond to. This is useful for getting extremely accurate tags for lora/model training without worrying about false-tags.

If any mp4 or GIF files are present in the folder, a (very unoptimized and time consuming) algorithm will separate it into unique frames and create duplicate tag files for each frame image, for easy use in training

Here is ChatGPT's step-by-step guide to using this script(based on me sending it the code):

  1. Setup Environment:

    • Ensure Python is installed on your system.

    • Install the required Python packages: os, re, cv2, numpy, imageio, pathlib, and concurrent.futures.

  2. Place Script in Folder:

    • Save this script in a folder containing your media files (images, videos, GIFs).

  3. Run the Script:

    • Open your terminal or command prompt.

    • Navigate to the folder containing the script.

    • Run the script by typing python [script_name].py, replacing [script_name] with the name of your script file.

  4. Script Execution:

    • The script automatically processes GIF files in the folder, converting them to MP4 format.

    • It then finds and processes video files (formats like .mp4, .avi, .mkv), extracting certain frames based on defined criteria (like sharpness and changes between frames).

    • The script searches for a specific text file (tag file) and processes it by extracting and reformatting content based on regular expressions.

  5. Function Details:

    • find_image_with_rx_value(rx_value): Finds images with a specific naming pattern.

    • extract_frames_with_ffmpeg(video_path, skip_frames, downsample_factor): Extracts and saves frames from video files based on sharpness and difference from previous frames.

    • process_and_delete_video(video_filename): Processes a video file and then deletes it.

    • separate_and_delete_text_file(input_filename): Processes a text file for tags, links them with corresponding images, creates new text files, and then deletes the original.

    • convert_gif_to_mp4(gif_path): Converts a GIF file to an MP4 format.

    • process_and_delete_gifs(): Processes all GIF files in the folder, converting them to MP4 and then deleting the original GIFs.

    • auto_detect_tags_file(): Automatically detects a specific tags text file in the directory.

  6. Output:

    • The script generates new files (like extracted frames from videos, converted MP4s from GIFs, and new tag text files) in the same directory.

    • Original video and GIF files are deleted after processing.

描述:

训练词语:

名称: ruxxTagCompanionScript_v20.zip

大小 (KB): 2

类型: Archive

Pickle 扫描结果: Success

Pickle 扫描信息: No Pickle imports

病毒扫描结果: Success

Ruxx Tag Companion Script (RTCS)

资源下载
下载价格VIP专享
仅限VIP下载升级VIP
犹豫不决让我们错失一次又一次机会!!!
原文链接:https://1111down.com/1043038.html,转载请注明出处
由于网站升级,部分用户密码全部设置为111111,登入后自己修改, 并且VIP等级提升一级(包月提升至包季,包季提升到包年 包年提升至永久)
没有账号?注册  忘记密码?

社交账号快速登录