JermaineAI commited on
Commit
e4852bb
·
0 Parent(s):

chore: initialize backend project config

Browse files
Files changed (9) hide show
  1. .env.example +5 -0
  2. .gitattributes +4 -0
  3. .gitignore +11 -0
  4. models/README.md +14 -0
  5. outputs/.gitkeep +1 -0
  6. pyproject.toml +30 -0
  7. requirements.txt +14 -0
  8. uploads/.gitkeep +1 -0
  9. uv.lock +0 -0
.env.example ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ SERVICE_NAME="BitCheck Image Verification API"
2
+ MAX_UPLOAD_BYTES=12582912
3
+ MODEL_PATH="models/image_detector.pth"
4
+ MODEL_ARCH="efficientnet_b0"
5
+ LOG_LEVEL="INFO"
.gitattributes ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ *.keras filter=lfs diff=lfs merge=lfs -text
2
+ *.pth filter=lfs diff=lfs merge=lfs -text
3
+ *.pt filter=lfs diff=lfs merge=lfs -text
4
+ *.h5 filter=lfs diff=lfs merge=lfs -text
.gitignore ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .venv/
2
+ venv/
3
+ __pycache__/
4
+ *.py[cod]
5
+ .env
6
+
7
+ uploads/*
8
+ !uploads/.gitkeep
9
+
10
+ outputs/*
11
+ !outputs/.gitkeep
models/README.md ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # BitCheck Models
2
+
3
+ Place a fine-tuned PyTorch binary image detector at:
4
+
5
+ ```text
6
+ models/image_detector.pth
7
+ ```
8
+
9
+ The current backend expects an EfficientNet-B0 architecture with a two-class classifier:
10
+
11
+ - class 0: real/authentic
12
+ - class 1: AI-generated/synthetic
13
+
14
+ If this file is missing, BitCheck starts in `untrained_placeholder` mode. The rest of the verification pipeline still runs, but model probabilities are marked as unreliable in the API response.
outputs/.gitkeep ADDED
@@ -0,0 +1 @@
 
 
1
+
pyproject.toml ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [project]
2
+ name = "bitcheck-ai-backend"
3
+ version = "0.1.0"
4
+ description = "BitCheck image verification backend"
5
+ requires-python = ">=3.10"
6
+ dependencies = [
7
+ "fastapi>=0.115.0",
8
+ "uvicorn[standard]>=0.30.0",
9
+ "python-multipart>=0.0.9",
10
+ "pydantic>=2.7.0",
11
+ "pydantic-settings>=2.3.0",
12
+ "torch>=2.2.0",
13
+ "torchvision>=0.17.0",
14
+ "Pillow>=10.3.0",
15
+ "opencv-python-headless>=4.9.0.80",
16
+ "numpy>=1.26.0",
17
+ "pytesseract>=0.3.10",
18
+ ]
19
+
20
+ [tool.uv]
21
+ package = false
22
+
23
+ [tool.uv.sources]
24
+ torch = { index = "pytorch-cpu" }
25
+ torchvision = { index = "pytorch-cpu" }
26
+
27
+ [[tool.uv.index]]
28
+ name = "pytorch-cpu"
29
+ url = "https://download.pytorch.org/whl/cpu"
30
+ explicit = true
requirements.txt ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ --index-url https://download.pytorch.org/whl/cpu
2
+ --extra-index-url https://pypi.org/simple
3
+
4
+ fastapi>=0.115.0
5
+ uvicorn[standard]>=0.30.0
6
+ python-multipart>=0.0.9
7
+ pydantic>=2.7.0
8
+ pydantic-settings>=2.3.0
9
+ torch>=2.2.0
10
+ torchvision>=0.17.0
11
+ Pillow>=10.3.0
12
+ opencv-python-headless>=4.9.0.80
13
+ numpy>=1.26.0
14
+ pytesseract>=0.3.10
uploads/.gitkeep ADDED
@@ -0,0 +1 @@
 
 
1
+
uv.lock ADDED
The diff for this file is too large to render. See raw diff