# 🚀 Quick Start Guide ## One-Command Setup ### Method 1: Using our setup script ```bash # Download the setup script curl -O https://huggingface.co/zhiqing0205/u2net-mvtec-loco-segmentation/raw/main/setup_project.py # Run setup (downloads everything automatically) python setup_project.py # Use the project cd u2net-mvtec-loco python mvtec_loco_fg_segmentation.py ``` ### Method 2: Using HuggingFace CLI ```bash # Install HuggingFace CLI pip install huggingface_hub # Download complete project (equivalent to git clone) huggingface-cli download zhiqing0205/u2net-mvtec-loco-segmentation \ --local-dir ./u2net-project --repo-type model # Use the project cd u2net-project python mvtec_loco_fg_segmentation.py ``` ### Method 3: Using Python ```bash # One-liner to download everything python -c " from huggingface_hub import snapshot_download snapshot_download('zhiqing0205/u2net-mvtec-loco-segmentation', local_dir='./u2net-project') print('Done! cd u2net-project && python mvtec_loco_fg_segmentation.py') " ``` ## What Gets Downloaded ✅ Complete source code ✅ Pre-trained model weights (u2net.pth - 169MB) ✅ Documentation (English + Chinese) ✅ Example scripts and utilities ✅ Ready to run immediately ## File Structure After Download ``` u2net-mvtec-loco/ ├── mvtec_loco_fg_segmentation.py # Main script ├── saved_models/ │ └── u2net/ │ └── u2net.pth # Pre-trained model (169MB) ├── model/ # Model architecture ├── data_loader.py # Data utilities ├── README.md # English docs ├── README_CN.md # Chinese docs └── ... ``` ## Immediate Usage ```bash # Process entire MVTec LOCO dataset python mvtec_loco_fg_segmentation.py # Process specific categories python mvtec_loco_fg_segmentation.py --categories breakfast_box # Custom threshold python mvtec_loco_fg_segmentation.py --threshold 0.3 ``` That's it! 🎉