Skip to content

Sara666-LI/yolov5-instrument-reading-detection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

yolov5-instrument-reading-detection

This is an implementation of instrument reading detection on Python 3 and YOLOv5 which can be applied to many scenarios like warehouse management, industrial automation and robotics. Before the application, you may need to read the official information about the deployment of YOLOv5. https://github.com/ultralytics/yolov5

If you use Docker, the code has been verified to work on this Docker container! https://hub.docker.com/r/ultralytics/yolov5

For the annotation tool, please refer to labelImg

Specific ackages may needed, install by: pip install -r requirements.txt

  1. To call detection functions, first import:

import detect_holes import detect_panel import detect_monitor import detect_meter #from ipynb.fs.full.meters_reading import detect as detect_meter

  1. Then call functions with:

detect_holes.detect(depth) detect_panel.detect() detect_monitor.detect() detect_meter.detect()

(Note: "detect_holes" and "detect_panel" are for the centrifuge. The rest are for the other machine)

  1. Outputs:

image detect_holes.detect(depth):

[x, y, z]

(Note:the method above for 3D coordinates is only for reference, you should have your own idea. To only get the pixel coordinates, you should comment the line 202:result = rs.rs2_deproject_pixel_to_point(color_intrin, [x,y], depth))

image

detect_panel.detect():

[ListOfButton], [ListOfDigits]

example: (['power_on', 'open_on'], [0, 230, 1]) (Note: "open_on" and "open_off" indicate that whether the light of the "open" button is on or off, e.g., "open_on" means the light of "open" button is on and the machine is covered. "Power_on" and "power_off" indicate that whether power is on or off. The status of button "power will go first.)

image

detect_monitor.detect():

[CurrentTemperature, TargetTemperature]

example: [97.5, 170.0] (Note: second element of the output list will be 0.0 if target temperature is not detected Here in our project, target temperature(the second element) is not in consideration)

image

detect_meter.detect(): angles example: 321.6°

  1. camera requirrement:

capture distance-original equipment: centrifuge holes detection: 20cm centrifuge panel detection: 27cm oven monitor detection: 20cm oven meter detection:17cm

  1. For the new oven panel: Please use the updated detection model best_oven_panel_new.pt Replace detec_meter.py with the updated one detec_meter_new.py Example: image

The repository includes:

Source code of YOLOv5

Application of labelImg tool

Evaluation on yolo metrics (AP)

Example of detection on my own dataset - LED/LCD instrument and pointer meter reading recognition 

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published