Skip to content

[Documentation] Add Inference Demo and Visualization Examples #11

@ramiredddy

Description

@ramiredddy

Background

Thank you for providing this MegEngine implementation of crowd detection! The repository contains solid training code and model implementations.

Request

It would be very helpful to add inference demonstration scripts and visualization examples to help users:

  1. Quickly test the pre-trained models
  2. Understand the model's detection capabilities
  3. Visualize detection results on sample images

Suggested Additions

1. Inference Script

  • A standalone script (e.g., demo.py or inference.py) that:
    • Loads pre-trained model weights
    • Processes input images
    • Outputs detection results with bounding boxes
    • Works with standard image formats (jpg, png)

2. Visualization Utilities

  • Helper functions to visualize detection results
  • Example output images showing:
    • Detected pedestrians with bounding boxes
    • Confidence scores
    • Different crowding scenarios (low, medium, high density)

3. Quick Start Examples

  • Add a "Quick Start" section in README with:
    • Command to run inference on sample images
    • Expected output format
    • Sample results (before/after images)

Benefits

  • Lowers barrier to entry for new users
  • Helps potential users evaluate the model before training
  • Provides reference for deployment scenarios
  • Increases community adoption and contribution

Example Structure

python demo.py --model weights/crowddet.pkl --input images/sample.jpg --output results/

Similar examples can be found in other detection repositories. Would be happy to contribute if you're open to PRs!

Thank you for considering this enhancement!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions