dansav/florence-2-sharp

Using C#/.NET to do inference with the Florence 2 models

C#

1

50 commits

updated Aug 17, 2025

See the code

README

Florence 2 C# Lab Project

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.

Getting Started

Follow these instructions to set up your development environment and get started with the project.

All code builds and runs on Windows and macOS.

Prerequisites

  • .NET 8.0 SDK
  • Optional: To run the Python code
    • uv Python project manager

.NET Projects

Install and Build

  1. Ensure .NET 8.0 SDK is installed

    Download and install the .NET 8.0 SDK from the official .NET website.

  2. Clone the repository:

    git clone https://github.com/dansav/florence-2-sharp.git
    cd florence-2-sharp
    
  3. Build and run the test application

    dotnet build
    dotnet run --project FlorenceTwoLab.Desktop/FlorenceTwoLab.Desktop.csproj
    

Python Research Project

Setup

  1. Install the uv tool.

  2. Download models and some test data:

    uv run setup.py
    
  3. Run main test script

    uv run main.py
    

Folder Structure

License

This project is licensed under the MIT License. See the LICENSE file for details.

Contact

For any questions or issues, please open an issue on GitHub or contact the project maintainers.

Happy coding!

dansav/florence-2-sharp

Using C#/.NET to do inference with the Florence 2 models

C#

1

50 commits

updated Aug 17, 2025

See the code

README

Florence 2 C# Lab Project

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.

Getting Started

Follow these instructions to set up your development environment and get started with the project.

All code builds and runs on Windows and macOS.

Prerequisites

  • .NET 8.0 SDK
  • Optional: To run the Python code
    • uv Python project manager

.NET Projects

Install and Build

  1. Ensure .NET 8.0 SDK is installed

    Download and install the .NET 8.0 SDK from the official .NET website.

  2. Clone the repository:

    git clone https://github.com/dansav/florence-2-sharp.git
    cd florence-2-sharp
    
  3. Build and run the test application

    dotnet build
    dotnet run --project FlorenceTwoLab.Desktop/FlorenceTwoLab.Desktop.csproj
    

Python Research Project

Setup

  1. Install the uv tool.

  2. Download models and some test data:

    uv run setup.py
    
  3. Run main test script

    uv run main.py
    

Folder Structure

License

This project is licensed under the MIT License. See the LICENSE file for details.

Contact

For any questions or issues, please open an issue on GitHub or contact the project maintainers.

Happy coding!

Languages

C#

60.8%

Jupyter Notebook

29.2%

Python

9.9%