perspectivLabs / CountingChallenge

0 stars 43 forks source link

Ankit Kumar Sahoo - counting challenge #13

Open Cradulllaaa opened 4 months ago

Cradulllaaa commented 4 months ago

Info

Name

Ankit Kumar Sahoo

Python Version

Python 3.10.11

Description

AI

YOLOv5: Technique: Real-time object detection with YOLOv5. Approach: Detects objects and draws bounding boxes around them. Counts detected items. Challenges: Requires correct model setup and dependencies.

YOLOv8: Technique: Enhanced object detection with YOLOv8. Approach: Provides improved accuracy and speed for detecting objects and overlaying masks. Challenges: Ensuring compatibility with the latest library versions.

Faster R-CNN: Technique: Object detection with Region Proposal Networks (RPN). Approach: Generates object proposals and refines them for detection. Challenges: High computational demands and memory usage.

Mask R-CNN: Technique: Object detection and instance segmentation. Approach: Detects objects and creates segmentation masks for overlay. (used 2 different methods) Challenges: Resource-intensive; requires handling large images efficiently.

Final Approach: Mask R-CNN was chosen for its accuracy in detection and segmentation using pre-trained weights, providing effective counting and mask overlay capabilities.

Non_AI

Approach: Grayscale Conversion: Convert the image to grayscale to simplify processing. Gaussian Blur: Apply blur to smooth the image and reduce noise. Edge Detection: Use Canny edge detection to find object boundaries. Contour Detection: Detect contours to identify and count objects. Drawing and Annotation: Draw bounding boxes around detected items and add text to indicate counts. Output: Save the processed image with annotations and print item counts.

Implementation: Utilized OpenCV for image reading, processing, and saving. Key functions include cv2.Canny for edge detection, cv2.findContours for contour detection, and cv2.drawContours for drawing. This method efficiently counts and highlights items without AI.

Additional Comments

I have created different output folders for each of the techniques used and named them accordingly.