You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+29-81Lines changed: 29 additions & 81 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,30 +4,6 @@ This project uses deep learning to analyze audio files and detect AI-generated c
4
4
5
5
## Setup
6
6
7
-
You can set up this project using either `uv` (recommended) or `pip`.
8
-
9
-
### Option 1: Using uv (Recommended)
10
-
11
-
1. Install `uv` if you haven't already:
12
-
```bash
13
-
curl -LsSf https://astral.sh/uv/install.sh | sh
14
-
```
15
-
16
-
2. Create and activate a virtual environment:
17
-
```bash
18
-
uv venv
19
-
source .venv/bin/activate # On Unix/macOS
20
-
# or
21
-
.venv\Scripts\activate # On Windows
22
-
```
23
-
24
-
3. Install the package in development mode:
25
-
```bash
26
-
uv pip install -e .
27
-
```
28
-
29
-
### Option 2: Using pip
30
-
31
7
1. Create and activate a virtual environment:
32
8
```bash
33
9
python -m venv .venv
@@ -50,39 +26,53 @@ For the training step, I used this file from here [Link text][https://github.com
50
26
For the example here, I set up a data folder at the top level with /data/train/ai and /data/train/real
51
27
and would .mp3 and .wav files that I want to fintune against. I got the real data from
52
28
FMA [Link Text][https://github.com/mdeff/fma] for testing, and the AI generated data from
53
-
Facebook's Music Gen.
29
+
Facebook's Music Gen. There needs to be the word "ai" in the path of the ai folders and "real" in the
30
+
path to the real songs.
54
31
55
-
**NOTE: In /model/pretrained/cnn14.py, I'm hardcoding the path to be /mode/pretrained/pretrained_models/Cnn14_16k_mAP=0.438.pth.gz. This would have to be changed in the future. Cnn14 only takes in gzip files
32
+
**NOTE: In /model/pretrained/cnn14.py, I'm hardcoding the path to be /model/pretrained/pretrained_models/Cnn14_16k_mAP=0.438.pth.gz. This would have to be changed in the future. Cnn14 only takes in gzip files
56
33
so gzip your file beforehand**
57
34
58
35
Steps:
59
-
1. First place files in audio-processing-ai/data/train (if you are going to finetune data against your model)
36
+
1. First place files in audio-processing-ai/data/train (if you are going to finetune data against your model)
37
+
**All AI Files should go in the /data/train/ai and all of the real files goes in /data/train/real. This is because we need to do supervised learning befor training the classfier which file is AI music and which is Real**
60
38
2. Figure out the model you are going to finetune against
61
39
3. Update this line (PRETRAINED_MODEL_PATH = 'model/pretrained/pretrained_models/Cnn14_16k_mAP=0.438.pth.gz') at cnn14.py to the .pth.gz file location of your choice
0 commit comments