107 lines
7.4 KiB
XML
107 lines
7.4 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<office:document xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0"
|
|
xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0"
|
|
xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0"
|
|
xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0"
|
|
xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0"
|
|
office:version="1.3" office:mimetype="application/vnd.oasis.opendocument.text">
|
|
<office:font-face-decls>
|
|
<style:font-face style:name="Arial" svg:font-family="Arial"/>
|
|
<style:font-face style:name="Courier" svg:font-family="Courier New"/>
|
|
</office:font-face-decls>
|
|
<office:styles>
|
|
<style:style style:name="Title" style:family="paragraph">
|
|
<style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0.2cm"/>
|
|
<style:text-properties fo:font-size="20pt" fo:font-weight="bold" fo:color="#0f172a"/>
|
|
</style:style>
|
|
<style:style style:name="Subtitle" style:family="paragraph">
|
|
<style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0.5cm"/>
|
|
<style:text-properties fo:font-size="11pt" fo:color="#64748b"/>
|
|
</style:style>
|
|
<style:style style:name="Heading1" style:family="paragraph">
|
|
<style:paragraph-properties fo:margin-top="0.4cm" fo:margin-bottom="0.2cm"/>
|
|
<style:text-properties fo:font-size="14pt" fo:font-weight="bold" fo:color="#0284c7"/>
|
|
</style:style>
|
|
<style:style style:name="Heading2" style:family="paragraph">
|
|
<style:paragraph-properties fo:margin-top="0.3cm" fo:margin-bottom="0.15cm"/>
|
|
<style:text-properties fo:font-size="11pt" fo:font-weight="bold" fo:color="#0f172a"/>
|
|
</style:style>
|
|
<style:style style:name="Body" style:family="paragraph">
|
|
<style:paragraph-properties fo:margin-top="0.1cm" fo:margin-bottom="0.2cm" fo:line-height="120%"/>
|
|
<style:text-properties fo:font-size="9.5pt" fo:color="#334155"/>
|
|
</style:style>
|
|
<style:style style:name="Code" style:family="paragraph">
|
|
<style:paragraph-properties fo:margin-top="0.1cm" fo:margin-bottom="0.2cm" fo:background-color="#1e293b" fo:padding="0.2cm"/>
|
|
<style:text-properties style:font-name="Courier" fo:font-size="8.5pt" fo:color="#38bdf8"/>
|
|
</style:style>
|
|
</office:styles>
|
|
<office:body>
|
|
<office:text>
|
|
<text:p text:style-name="Title">Panduan Lengkap Sistem: Arsitektur, Alur & Cara Menjalankan</text:p>
|
|
<text:p text:style-name="Subtitle">Dokumen Tunggal Terintegrasi untuk Developer & AI Assistant | Retraining Studio & Live Counter Feedmill</text:p>
|
|
|
|
<text:p text:style-name="Heading1">1. Panduan Lengkap: Cara Menjalankan Sistem</text:p>
|
|
|
|
<text:p text:style-name="Heading2">A. Menjalankan Retraining Studio dengan Docker (Direkomendasikan)</text:p>
|
|
<text:p text:style-name="Code">cd /home/asus/feedmill/reTraining
|
|
cp .env.example .env # Masukkan HF_TOKEN
|
|
VIDEO_ARCHIVE_HOST=/path/ke/video/archive docker compose up -d --build
|
|
|
|
# Buka Web Studio di browser: http://localhost:8080 (API di :8000)
|
|
# Cek status & GPU: curl http://localhost:8000/api/health</text:p>
|
|
|
|
<text:p text:style-name="Heading2">B. Menjalankan Mode Development (Manual tanpa Docker)</text:p>
|
|
<text:p text:style-name="Code"># Terminal 1 - Backend FastAPI:
|
|
cd /home/asus/feedmill/reTraining
|
|
uv pip install -r requirements.txt
|
|
uv pip install -e sam3/
|
|
uv run uvicorn backend.main:app --reload --port 8000
|
|
|
|
# Terminal 2 - Frontend React (Vite):
|
|
cd /home/asus/feedmill/reTraining/frontend
|
|
npm install
|
|
npm run dev # Buka http://localhost:5173</text:p>
|
|
|
|
<text:p text:style-name="Heading2">C. Menjalankan Live Counter Lapangan (menghitung-karung)</text:p>
|
|
<text:p text:style-name="Code">cd /home/asus/feedmill/menghitung-karung
|
|
python3 predict.py # Deteksi & counter real-time
|
|
python3 counter_dashboard.py # Dashboard operator di http://localhost:5000
|
|
|
|
# Atau via systemd:
|
|
sudo systemctl restart karung-counter.service
|
|
sudo systemctl restart karung-counter-dashboard.service</text:p>
|
|
|
|
<text:p text:style-name="Heading2">D. Langkah Operasional Retraining di Web Studio</text:p>
|
|
<text:p text:style-name="Body">1. Projects Screen: Buat project atau pilih yang ada, upload base model (.pt), tetapkan kelas (misal: karung-pakan).</text:p>
|
|
<text:p text:style-name="Body">2. Video Archive: Pilih batch rekaman video per siklus kerja, tentukan rentang detik & FPS, klik Extract Frames.</text:p>
|
|
<text:p text:style-name="Body">3. SAM3 Auto-Label: AI otomatis mendeteksi & membuat polygon label berdasarkan teks prompt nama kelas.</text:p>
|
|
<text:p text:style-name="Body">4. Review Canvas: Periksa frame di web canvas, perbaiki label jika perlu, dan approve data.</text:p>
|
|
<text:p text:style-name="Body">5. Data Prep & Merge: Filter kualitas lalu konfirmasi merge ke Master Dataset (immutable & val split stabil).</text:p>
|
|
<text:p text:style-name="Body">6. YOLO Training: Fine-tuning YOLO11 dan bandingkan mAP model baru vs base model. Ambil output best.pt.</text:p>
|
|
|
|
<text:p text:style-name="Heading1">2. Alur Kerja Aplikasi (Workflow)</text:p>
|
|
<text:p text:style-name="Body">• CCTV Stream (:8554) -> Deteksi real-time & rekaman batch MP4 di menghitung-karung.</text:p>
|
|
<text:p text:style-name="Body">• Rekaman ditarik ke Studio Retraining -> Ekstrak frame FFmpeg -> Auto-label SAM3 -> Review Canvas.</text:p>
|
|
<text:p text:style-name="Body">• Dataset dikunci -> YOLO Retraining -> Benchmark mAP Base vs New -> Output best.pt.</text:p>
|
|
|
|
<text:p text:style-name="Heading1">3. Penjelasan Port & Jaringan</text:p>
|
|
<text:p text:style-name="Body">• Port 8080: Web UI Retraining Studio (Docker / Nginx)</text:p>
|
|
<text:p text:style-name="Body">• Port 8000: FastAPI Backend (REST API & Background Jobs)</text:p>
|
|
<text:p text:style-name="Body">• Port 5173: Frontend Dev Server (React Vite)</text:p>
|
|
<text:p text:style-name="Body">• Port 5000: Dashboard Live Counter Lokal</text:p>
|
|
<text:p text:style-name="Body">• Port 8554 / 554: RTSP Live Video Stream CCTV</text:p>
|
|
|
|
<text:p text:style-name="Heading1">4. Peta Filesystem & Lokasi Folder</text:p>
|
|
<text:p text:style-name="Body">• Backend: /home/asus/feedmill/reTraining/backend/ (FastAPI, db.py, jobs)</text:p>
|
|
<text:p text:style-name="Body">• Frontend: /home/asus/feedmill/reTraining/frontend/ (React 19, Vite 7, Tailwind)</text:p>
|
|
<text:p text:style-name="Body">• SAM3: /home/asus/feedmill/reTraining/sam3/ (Vendor Meta SAM3)</text:p>
|
|
<text:p text:style-name="Body">• Storage: /home/asus/feedmill/reTraining/data/ (app.db, master dataset train/val, models/best.pt)</text:p>
|
|
<text:p text:style-name="Body">• Live Counter: /home/asus/feedmill/menghitung-karung/ (predict.py, dashboard, zones.json, jetson_counter.db)</text:p>
|
|
|
|
<text:p text:style-name="Heading1">5. Status: Before, Current, and Next</text:p>
|
|
<text:p text:style-name="Body">• BEFORE: Model statis, pelabelan manual lambat di CVAT, tidak ada validasi mAP terstandar.</text:p>
|
|
<text:p text:style-name="Body">• CURRENT: Retraining Studio mandiri aktif lokal di GPU workstation (SAM3 auto-label, valid split stabil, evaluasi mAP otomatis).</text:p>
|
|
<text:p text:style-name="Body">• NEXT: Skrip otomatis ekspor TensorRT (.engine) dan fitur active learning otomatis.</text:p>
|
|
</office:text>
|
|
</office:body>
|
|
</office:document> |