bawolf commited on
Commit
744ba87
β€’
1 Parent(s): 31fc7e1

prepare for replicate

Browse files
.dockerignore ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # generated by replicate/cog
2
+ __pycache__
3
+ *.pyc
4
+ *.pyo
5
+ *.pyd
6
+ .Python
7
+ env
8
+ pip-log.txt
9
+ pip-delete-this-directory.txt
10
+ .tox
11
+ .coverage
12
+ .coverage.*
13
+ .cache
14
+ nosetests.xml
15
+ coverage.xml
16
+ *.cover
17
+ *.log
18
+ .git
19
+ .mypy_cache
20
+ .pytest_cache
21
+ .hypothesis
README.md CHANGED
@@ -22,6 +22,20 @@ curl -o /usr/local/bin/cog -L https://github.com/replicate/cog/releases/latest/d
22
  chmod +x /usr/local/bin/cog
23
  ```
24
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
25
  ## Training
26
 
27
  ```bash
@@ -75,21 +89,6 @@ clip/
75
  - Fine-tuned vision encoder (last 3 layers)
76
  - Output: 4-class classifier
77
 
78
- ## Performance
79
-
80
- - Training Accuracy: ~95%
81
- - Validation Accuracy: ~92%
82
- - Inference Time: ~100ms per video
83
-
84
- ## Configuration
85
-
86
- Key hyperparameters can be modified in `config/default.yaml`:
87
- - Frame sampling: 10 frames per video
88
- - Image size: 224x224
89
- - Learning rate: 2e-6
90
- - Weight decay: 0.007
91
- - Data augmentation parameters
92
-
93
  ## License
94
 
95
  [Your License Here]
 
22
  chmod +x /usr/local/bin/cog
23
  ```
24
 
25
+ ## Cog
26
+
27
+ build the image
28
+
29
+ ```bash
30
+ cog build --separate-weights
31
+ ```
32
+
33
+ push the image
34
+
35
+ ```bash
36
+ cog push
37
+ ```
38
+
39
  ## Training
40
 
41
  ```bash
 
89
  - Fine-tuned vision encoder (last 3 layers)
90
  - Output: 4-class classifier
91
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
92
  ## License
93
 
94
  [Your License Here]
cog.yaml CHANGED
@@ -14,5 +14,5 @@ build:
14
  - "numpy"
15
  - "scipy"
16
  - "huggingface_hub"
17
-
18
  predict: "predict.py:Predictor"
 
14
  - "numpy"
15
  - "scipy"
16
  - "huggingface_hub"
17
+ image: "r8.im/bawolf/break-video-clip"
18
  predict: "predict.py:Predictor"
{scripts β†’ script}/hyperparameter_tuning.py RENAMED
@@ -4,7 +4,7 @@ import os
4
  import os
5
  import sys
6
  sys.path.append(os.path.dirname(os.path.dirname(__file__)))
7
- from scripts.train import train_and_evaluate
8
  from src.utils.utils import create_run_directory
9
 
10
  def objective(trial, hyperparam_run_dir):
 
4
  import os
5
  import sys
6
  sys.path.append(os.path.dirname(os.path.dirname(__file__)))
7
+ from script.train import train_and_evaluate
8
  from src.utils.utils import create_run_directory
9
 
10
  def objective(trial, hyperparam_run_dir):
{scripts β†’ script}/inference.py RENAMED
File without changes
{scripts β†’ script}/train.py RENAMED
File without changes
{scripts β†’ script}/visualization/miscalculations_report.py RENAMED
File without changes
{scripts β†’ script}/visualization/visualize.py RENAMED
@@ -12,7 +12,6 @@ sys.path.append(os.path.dirname(os.path.dirname(os.path.dirname(__file__))))
12
  from src.data.dataset import VideoDataset
13
  from src.utils.utils import get_latest_model_path, get_latest_run_dir, get_config
14
  from src.models.model import load_model
15
- import json
16
 
17
  def plot_training_curves(log_file, output_dir):
18
  data = pd.read_csv(log_file)
 
12
  from src.data.dataset import VideoDataset
13
  from src.utils.utils import get_latest_model_path, get_latest_run_dir, get_config
14
  from src.models.model import load_model
 
15
 
16
  def plot_training_curves(log_file, output_dir):
17
  data = pd.read_csv(log_file)
src/models/__init__.py DELETED
File without changes