Skip to content

Conversation

@kunkunlin1221
Copy link
Collaborator

@kunkunlin1221 kunkunlin1221 commented Aug 27, 2025

!!! Git lfs unstable in container

@kunkunlin1221 kunkunlin1221 self-assigned this Aug 27, 2025
Copilot AI review requested due to automatic review settings August 27, 2025 17:03
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR implements face depth functionality and refactors the face detection testing infrastructure. The changes move from hardcoded test expectations to file-based test data storage and add comprehensive face depth testing capabilities.

Key changes:

  • Replaces inline test data with NPZ file-based test expectations for better maintainability
  • Adds complete face depth testing module with batch processing support
  • Fixes batch size handling bug in multiple face processing components

Reviewed Changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tests/test_face_detection.py Refactored to use NPZ files for test data and added batch testing
tests/test_face_depth.py New comprehensive test suite for face depth functionality
tests/resources/answer/*.npz Git LFS tracked test data files for face detection and depth
pyface/utils.py Removed deprecated backend detection utilities
pyface/components/face_recognition/arcface.py Fixed batch size variable naming for clarity
pyface/components/face_gender.py Fixed batch size variable naming for clarity
pyface/components/face_detection/scrfd.py Fixed batch size variable naming for clarity
pyface/components/face_depth/tddfav2.py Fixed batch processing, type hints, and data handling
.gitattributes Added NPZ files to Git LFS tracking

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@kunkunlin1221 kunkunlin1221 force-pushed the feat/fix_face_depth branch 4 times, most recently from f95a3b1 to a65310e Compare August 27, 2025 17:40
@kunkunlin1221
Copy link
Collaborator Author

kunkunlin1221 commented Aug 28, 2025

This pull request introduces several improvements and refactoring across demo scripts, CI workflows, and core components. The main focus is on standardizing resource paths in demo scripts, enhancing the CI pipeline (especially for CUDA builds), fixing batch handling in model inference, and updating Dockerfile configurations for compatibility and maintainability.

Demo script improvements:

  • Standardized resource directory usage in all demo scripts (demo/face_detection.py, demo/face_depth.py, demo/face_gender.py, demo/face_landmark.py, demo/face_normalization.py, demo/face_recognition.py, demo/face_service.py). This replaces previous ad-hoc path handling with a consistent RESOURCE_DIR definition pointing to test resources. Output directories are also consistently created using cb.get_curdir(__file__) / "output". [1] [2] [3] [4] [5] [6] [7]

CI/CD and Dockerfile enhancements:

  • Added a dedicated Dockerfile for PR builds (docker/pr.dockerfile) using nvidia/cuda:12.8.1-cudnn-runtime-ubuntu24.04, and updated the main Dockerfile to match the new base image for improved compatibility. [1] [2]
  • Refactored the CUDA CI workflow (.github/workflows/cuda-ci.yml) to build and use a custom Docker image, retrieve runner UID/GID, and run jobs inside containers with GPU support. This improves reproducibility and resource management for GPU-based CI.
  • Minor improvements to the CPU CI workflow (.github/workflows/cpu-ci.yml), including renaming steps for consistency and clarity. [1] [2]

Core component bug fixes and refactoring:

  • Fixed batch size handling in model inference calls for face detection, gender detection, and depth estimation components. This ensures correct splitting and concatenation of inference results, preventing shape mismatches and potential runtime errors. [1] [2] [3]
  • Minor code style and type annotation improvements in pyface/components/face_depth/tddfav2.py, including function signature updates and pylint disables for import errors. [1] [2] [3] [4] [5]

Repository maintenance:

  • Removed LFS filters for image files in .gitattributes, likely to simplify repository management and avoid LFS-related issues for .jpg and .png files.

@kunkunlin1221 kunkunlin1221 merged commit d41a633 into main Aug 28, 2025
9 checks passed
@kunkunlin1221 kunkunlin1221 deleted the feat/fix_face_depth branch August 28, 2025 03:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants