Welcome to the Florence 2 C# Lab Project!
This project explores the requirements and processes involved in performing inference with the Florence 2 models using C#/.NET.
Follow these instructions to set up your development environment and get started with the project.
All code builds and runs on Windows and macOS.
- .NET 8.0 SDK
- Optional: To run the Python code
- uv Python project manager
-
Ensure .NET 8.0 SDK is installed
Download and install the .NET 8.0 SDK from the official .NET website.
-
Clone the repository:
git clone https://github.com/dansav/florence-2-sharp.git cd florence-2-sharp
-
Build and run the test application
dotnet build dotnet run --project FlorenceTwoLab.Desktop/FlorenceTwoLab.Desktop.csproj
-
Install the uv tool.
-
Download models and some test data:
uv run setup.py
-
Run main test script
uv run main.py
- FlorenceTwoLab.Core: Core implementation of the Florence 2 model and related utilities
- FlorenceTwoLab.Core.Tests: Unit tests for the core functionality
- FlorenceTwoLab.Desktop: AvaloniaUI-based desktop application
- research: Research materials and documentation
- python_reference_implementation: Reference implementation in Python
This project is licensed under the MIT License. See the LICENSE file for details.
For any questions or issues, please open an issue on GitHub or contact the project maintainers.
Happy coding!