generated from opentensor/bittensor-subnet-template
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Backbone now loaded from path in UCF detector config rather than train config * Updated ad hoc detector unit tests, added one script that runs all tests * Removed deprecated mining model weights directory * UCFDetector config no longer provides backbone path, instead uses training config backbone path which defaults to xception-best.pth on HF * Updated backbone load check * Training now uses xception-best.pth backbone weights from bitmind/bm-ucf/ on HuggingFace
- Loading branch information
Showing
10 changed files
with
27 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
# UCFDetector Generalist Configuration | ||
hf_repo: 'bitmind/bm-ucf' # Hugging Face repository for downloading model files | ||
train_config: 'bm-general-config.yaml' # pre-trained configuration file in HuggingFace | ||
weights: 'bm-general.pth' # UCF model checkpoint in HuggingFace | ||
backbone_weights: 'xception-best.pth' # backbone model checkpoint in HuggingFace | ||
weights: 'bm-general.pth' # UCF model checkpoint in HuggingFace |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
base_miner/deepfake_detectors/unit_tests/run_all_unit_tests.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import os | ||
import subprocess | ||
|
||
def run_all_py_scripts(directory): | ||
# List all files in the directory | ||
for filename in os.listdir(directory): | ||
# Check if the file ends with .py and is not this script itself | ||
if filename.endswith('.py') and filename != os.path.basename(__file__): | ||
# Full path of the python file | ||
filepath = os.path.join(directory, filename) | ||
print(f"Running {filename}...") | ||
|
||
# Run the script using subprocess | ||
subprocess.run(['python', filepath]) | ||
|
||
if __name__ == "__main__": | ||
# Run all python files in the current directory | ||
run_all_py_scripts(os.getcwd()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.