A React application that provides a user-friendly interface for testing and using the DINO-X API for object detection, segmentation, and analysis in images.
Reality2DProxies is a tool that allows you to upload images and analyze them using the DINO-X API. The application provides a visual representation of detected objects, bounding boxes, and segmentation masks. It's built with React, TypeScript, and Vite, and uses Tailwind CSS for styling.
- Upload and analyze images using the DINO-X API
- Customize analysis prompts
- View detected objects with bounding boxes and segmentation masks
- Filter results by object category
- Select different visualization layers (bounding boxes, masks, etc.)
- Integration with GPT-4V for additional analysis (optional)
- Node.js (v16 or higher)
- npm or yarn
- DINO-X API token (from Deep Data Space)
- (Optional) OpenAI API key for GPT-4V integration
-
Clone the repository:
git clone https://github.com/yourusername/Reality2DProxies.git cd Reality2DProxies -
Install dependencies:
npm install # or yarn install -
Create a
.envfile based on the example:cp .env.example .env
-
(Optional) Add your OpenAI API key to the
.envfile if you want to use GPT-4V integration:VITE_OPENAI_API_KEY=your_api_key_here
Start the development server:
npm run dev
# or
yarn devThe application will be available at http://localhost:5173.
- Enter your DINO-X API token in the token field
- Upload an image by dragging and dropping or clicking the upload area
- Customize the prompt (default is
<universal_twice>) - Click "Analyze" to process the image
- View the results in the display area below
- Use the filter bar to show/hide specific object categories
- Use the layer selector to toggle different visualization elements
The application integrates with the DINO-X API from Deep Data Space. The API provides object detection, segmentation, and analysis capabilities.
The default prompt <universal_twice> is a special prompt that instructs the DINO-X API to detect a wide range of objects. You can customize this prompt based on your specific needs.
src/components/- React components for the UIsrc/hooks/- Custom React hooks for state management and API integrationsrc/services/- API integration servicessrc/types/- TypeScript type definitionssrc/utils/- Utility functions
npm run dev- Start the development servernpm run build- Build the application for productionnpm run lint- Run ESLint to check for code issuesnpm run preview- Preview the production build locally
To add new features or modify existing ones:
- Make changes to the relevant components or services
- Test your changes locally
- Submit a pull request with a description of your changes
- API Token Issues: Ensure your DINO-X API token is valid and correctly entered
- Image Upload Problems: Check that your image is in a supported format (JPEG, PNG)
- Analysis Timeout: Large images or complex scenes may take longer to analyze
[Include license information here]
- DINO-X API for providing the object detection capabilities
- React and Vite for the frontend framework
- Tailwind CSS for styling
- Lucide React for icons