Download p_detect.py from bep40/vaistudio-data: direct link, hf CLI and curl.
- Browser
- Download file 2.24 kB
-
https://huggingface.co/datasets/bep40/vaistudio-data/resolve/main/p_detect.py
- Command line
-
hf download hf://datasets/bep40/vaistudio-data/p_detect.py
-
curl -L -o p_detect.py https://huggingface.co/datasets/bep40/vaistudio-data/resolve/main/p_detect.py
2.24 kB
| EDITS = [( | |
| ''' const sys = "You are an AI object detector for interior design photos. List the main furniture objects you see: sofa, chair, table, lamp, shelf, mirror, tv, bed, cabinet, curtains, rug, decor. Return 1-8 objects in Vietnamese, short label each, no explanations, no extra text.";''', | |
| ''' // VAI-FIX v14 (NHẬN DI ĐỐI TƯỢNG CHI TIẾT — BẮT BUỘC PHÂN THẤP HẾT CÁC | |
| // VẬT DỤNG NHỎ: trước đây chỉ yêu cầu "sofa, chair, table..." → model trả | |
| // đúng 1-2 vật lớn rồi bỏ qua các vật dụng trong tủ bếp (bình nước, dĩa, | |
| // ấm chén, dao dở, lò vi sóng, giá để ly...). Bây giờ yêu cầu PHÂN THẤP | |
| // theo thứ tự ưu tiên: PHÒNG → BÀN/NGƯỜI DỤNG → VẬT DỤNG NHỎ → MÀU/SỰ KIỆN. | |
| // Model phải trả về TẤT CẢ các vật dụng thấy được, không được bỏ sót. | |
| const sys = "You are an AI object detector for INTERIOR DESIGN photos (kitchens, living rooms, bedrooms, bathrooms, balconies). " + | |
| "Your job: list EVERY distinct object you can see, from the largest to the smallest. " + | |
| "DO NOT skip small items — a kitchen photo must include utensils on the counter (bottles, plates, cups, kettles, knives, cutting boards, bowls, fruit baskets, dish racks, microwaves, range hoods, faucets, soap dispensers). " + | |
| "Return 1-15 objects, each a SHORT Vietnamese label (1-4 words). " + | |
| "Order by importance: room first (phòng bếp / phòng khách / phòng ngủ / phòng vmax / ban công), then big furniture (tủ bếp, bàn, ghế, sofa, tivi, kệ, chậu rửa, bếp từ, máy hút mùi, tủ lạnh), then small items (bình nước, dĩa, ấm chén, dao, thớt, ly, trái cây, đồ gia dụng). " + | |
| "Use specific Vietnamese nouns, no adjectives, no sentences, no 'and', no numbers. " + | |
| "Example for a kitchen: [\\"phòng bếp\\", \\"tủ bếp trên\\", \\"tủ bếp dưới\\", \\"bếp từ\\", \\"máy hút mùi\\", \\"chậu rửa inox\\", \\"vòi rửa\\", \\"bình nước\\", \\"dĩa\\", \\"ấm chén\\", \\"dao\\", \\"thớt\\", \\"lò vi sóng\\", \\"kệ dao dở\\", \\"trái cây\\"] " + | |
| "Return ONLY a JSON array of strings, nothing else.";''')]) |