Hard-Hat Detection for Construction Safety Visualization

In 2012, 775 fatalities were recorded, and many more were injured at construction sites in the United States. Of these, 415 fatalities (54%) were due to fall, slips, and trips as well as being struck by falling objects. In order to decrease fatalities at construction sites to these types of events, the Occupational Safety and Health Administration (OSHA) provides Fall Prevention and OSHA-10 trainings to construction workers. Moreover, safety personnel monitor whether the workers use personal protective equipment (PPE) properly. Data shows that construction fatalities have decreased by 2% annually since 1994; however, the owners still are not satisfied with this result. Various studies have shown that fall is the biggest contributor for construction fatalities. One study showed that half of the fall fatalities were because the workers either had not used PPEs or had not used them properly. In addition, studies showed that, with proper use of hard hats, the fatalities due to fall, slips, trips, and being struck by falling objects could be reduced. This study developed and tested a hard-hat detection tool that uses image-processing techniques to identify whether workers are wearing hard hats. The tool dispatches warning messages if the workers do not use hard hats.


Introduction
In the United States, many people work at jobsites under unsafe conditions, and thousands lose their lives every year.In the US, 4,383 fatal work injuries in workplaces were recorded in 2012; on average, this was 89 fatalities a week and nearly 12 fatalities every day.Construction jobs are among the 10 deadliest jobs [1,2].The fatality rate-the ratio of number of fatalities and total hours worked by all workersat construction sites in 2012 was 3. 4 [3].The fatality rate reflects the number of fatalities per 100,000 full time workers.According to OSHA [4], the fatality rate is calculated as Fatality Rate = Number of fatal work injuries Total hours worked by all workers * 200,000. ( The fatality rate in some developing countries is much higher than in developed countries.For example, in Republic of Korea, the fatality rate in construction industry is more than double that of the United States [5].This higher rate of construction fatalities in developing countries had construction managers concerned.Furthermore, the construction industry in the US, the largest industry, had a high rate of construction fatalities and injuries [3].Bureau of Labor Statistics data from 1990 onwards showed that the national fatality rate began to decrease (by 2% annually) from 1994; however, it is increasing in Nevada.In 2011, construction industry had the second largest number of fatalities in the United States [6,7].
Of the 4,383 fatal injuries in workplaces in the United States in 2012, 4,175 were injured in private industry and approximately one-fifth (19.30%) of total private industry fatalities were recorded in the private construction industry [8].The leading causes of the construction site fatalities were falls, slips, being struck by objects, electrocution, and being caught in/between objects [8].Specifically, the deaths in construction jobs due to falls were 34.6% of total deaths in construction [8]; this percentage was 49.9% during the 1980s and first half of 1990s [9].Table 1 shows the percentage of In most of the fall incidents, the workers fall from heights and hit their heads on hard floors.An investigation report showed that half of the fall incidents were recorded from a height of less than equal to 3 m; moreover, the origins of 57% of the fall incidents were from ladders, roofs, buildings under construction, and platforms or scaffolding [10].Hard hats are designed to resist shock and penetration by objects as well as contact with electrical hazards.If workers wear hard hats properly, half of the fatalities due to falls and a significant number of fatalities due to slips, trips, and struck by falling objects could be expected to decrease [11].In one study that investigated the number of construction fatalities and the use of PPEs, the results showed that 47.3% of fatally injured victims either had not used PPEs or had not used them properly [5].
Figure 1 shows a typical construction site.On the left, all the workers are wearing hard hats except one, who is holding his hard hat in his hand.On the right, two workers are not wearing hard hats during their work on a scaffold.These types of pictures transmitted from the construction sites can be analyzed to determine whether the workers are following the safety rules.In this study, a software tool was developed to automatically detect whether the workers are wearing hard hats at construction site.
The National Institute for Occupational Safety and Health [9] investigated fatal injuries due to falls at construction sites.Data showed that, from 1980 to 1994, falls were the leading cause of occupational fatalities.At construction sites during that period, falls from ladders, scaffolding, and buildings and other structures as well as falls from one level to another were 12.3%, 13%, 34.7%, and 16.6%, respectively, during 1980 to 1994; from 1982 to 1997, they were 8.8%, 18.7%, 63.8%, and 8.8%, respectively.From 1980 to 1994, the dataset of fatalities due to falls was compared among 11 divisions (e.g., construction, agriculture, mining, manufacturing, and transportation).The data in this study showed that the fatalities due to falls were 49.9% of the total fatalities, for a fatality rate of 3.89.
To decrease injuries by enforcing work-related safety rules, the US government established the Occupational Safety and Health Administration (OSHA) in 1970.OSHA prepares guidelines for work safety and offers grants for safety training to construction workers in order to train them about the importance of using PPEs properly [12].In addition, OSHA monitors construction sites to make sure that contractors and owners follow the safety rules to avoid injuries at the site.Due to various reasons, workers at construction sites sometimes fail to obey the OSHA rules and regulations, for example, under extreme weather conditions or due to stress in meeting work deadlines.
Because of OSHA's involvement, most states have decreasing fatalities in the workplaces [3]; however, safety engineers and construction managers are not satisfied with the current visual monitoring method to check workers on whether they are using PPEs.They are looking for an innovative method to monitor the workers more comprehensively.In the traditional supervision (visual monitoring) method, the safety engineers occasionally fail to enforce construction workers to use their hard hats because they could not check the workers every hour and every day.However, if the safety engineers could monitor the workers in real time by using video transmitted from the site, the safety rules regarding hard hats could be enforced more effectively.This could reduce the fatality rates due to falls, slips, trips, and being struck by falling objects.This study developed a tool of identifying the workers not wearing hard hat on sites.
To develop the tool that automatically detects workers who are not wearing hard hat in the real-time video, a visualization approach was used.The visualization approach is an innovative software tool that monitors the workers in real time and dispatches warning messages to concerned personnel once the safety rules (wearing hard hats properly at this stage) are violated.This approach, shown in Figure 2, consists of (1) a closed-circuit television (CCTV) camera installed at construction site, (2) a wired/wireless network to transfer videos taken by CCTV camera to the server (office computer), (3) a server at the nearest office, (4) speakers at the office and the site to warn against safety violations, (5) cell phones with local area network (LAN) wireless to send warning messages to the concerned people.
(6) Images of the construction site are displayed continuously on the office computers.Using real-time images, the software program detects whether the workers are using their hard hats properly.When the program detects a worker at the site without a hard hat, the program triggers warning messages.This tool was developed using image processing software.This current study is an extension of previous studies in the field of construction safety visualization, computer vision, pattern recognition, and Internet transmission [13][14][15][16].The tool was developed using an image processing method to detect the face of a worker and then used edge detection program and segmentation methods to identify whether the worker had a hard hat.The software tool was developed by a combined effort of construction engineers and computer science professionals and then tested in the Construction Management Laboratory at University of Nevada, Las Vegas (UNLV).
The hard-hat detection tool could detect whether workers are wearing hard hats.At this initial stage of program development, its scope is limited to hard hats.The use of this tool primarily is applicable at building construction sites where workers can be observed by cameras from the surrounding environment.Technical difficulties in using this tool occur in linear construction projects, such as road construction or buildings with limited range of the cameras.

Literature Review
The literature review to frame this study focused on two main areas, computer visualization and image processing.The papers reviewed in these areas are summarized as follows.[17] studied and designed a "smart hat" to prevent construction workers from contact with heavy equipment, using radio frequency (RF) technology.A wireless silicon microprocessor was attached to the hard hats as well as to the heavy equipment.Once the workers ventured close to the heavy equipment, as specified for the microprocessor, the system broadcasted a high-pitched alarm to warn them.The authors claimed that when construction workers and heavy equipment share a workplace and safety concerns are high, this technology is very useful.

Computer Visualization. Teizer and Reynolds
The authors investigated the performance of an RGB-D sensor to track a worker and or an object in terms of three parameters [18]: (1) 3D movement of a worker's body position, as tracked by the sensor; (2) 3D rotation angles of the body parts; and (3) analysis of the sensor's accuracy regarding body-part movement.These three datasets were gathered during experimental studies.To compare these datasets, another dataset also was taken, using six 4-megapixel VICON sensors, which were considered to give the most accurate results.The comparative results showed that the discrepancy of the location track of the RGB-D sensors was 10.70 cm, and difference in rotation angles was 16.20 degrees.However, the difference in results regarding movement analysis was insignificant.

Image
Processing.Shrestha et al. [16] developed a framework for construction safety visualization and developed and tested an edge detection algorithm.The framework included the installation of a set of CCTV cameras, a powerful server at the site office, and equipment to send warning messages to safety-related personnel once the program detected workers not wearing hard hats in the construction sites.The server was a powerful office computer equipped with two algorithms, edge detection and segmentation.This study developed the segmentation algorithm in order to identify the worker and hard hats.
In this study, Curio et al. [19] used an image-processing method to detect a walking pedestrian.The program concluded that a walking pedestrian in the image needed to satisfy two conditions.The first condition was that the image matched the outline of a human; the second condition was the periodic movement of legs while walking.Taking an image using two cameras, stereovision could be produced.Stereovision could be used for short-range and midrange distances from the camera to the pedestrian.
Tsai et al. [20] studied the detection of defective traffic signals by using an image-processing technique.The recognition of the traffic sign types, the exact location of the sign for inventory purposes, and identification of signboard conditions-retroreflectivity, faded sign colors, tilted signs, and sign boards blocked by objects-could be identified using the program.In the detection process, traffic signs were identified in terms of their shape, color, background, and legend.A crucial step for the image-processing algorithms was to separate the images that contained traffic signs from those that did not.During the program execution, first, the traffic sign is detected and, second, recognition is achieved.This study dealt only with traffic detection.
Canny [21] developed an edge detection algorithm, which had five distinct steps.
(1) Smoothing: this is a blurring of an image.Every image has some amount of noise in it, and a Gaussian filter is used to smooth it.
(2) Finding gradients: these are edges in a grayscale image where the grayscale intensity changes the most.This is identified by determining the gradients.
(3) Nonmaximum suppression: the maxima in the gradient image are preserved, and the rest is erased.
(4) Double thresholding: the pixels that remain after Step (3) are marked with their strength, pixel by pixel.
(5) Edge tracking by hysteresis: strong edges and weak edges connected with strong edges considered "certain edges." Park et al. [22] conducted research to determine whether the person at a construction site is actually a worker.A worker was confirmed by fulfilling two conditions, the outline of a person and the presence of PPEs.The program developed in this study analyzed the video frames of the construction site by using an image-processing technique to separate moving objects from background images in order to identify the outline of the person.After the person was detected by analyzing the pixels of the images, the person was identified as a worker or not.In this experiment, a worker wore a vest and a hard hat, which has a higher pixel rate than a person wearing normal dress.From the differences in pixels, the system determined whether the person was a worker.Han et al. [18] used a vision-based motion detection to track unsafe working behavior of construction workers, using video camera images.A 3D model of a worker was developed using images from two different cameras.The 3D model was analyzed to figure out whether the worker's movement was safe.However, this study did not apply a real-time imageprocessing technique.
Tharindu et al. [23] detected workers at construction sites using an image-processing technique with a Kinect sensor.Using video camera images, the program identified the location of the workers.To ensure that the image was a construction worker, the person detected by image processing needed to have a hard hat on.The hard hat was detected using pattern recognition.
Escorcia et al. [24] detected workers and their actions at construction sites using Kinect sensor technology.An algorithm based on machine-learning techniques was used for this study.The video-log images were analyzed to determine the accurate actions of the construction workers.This program is useful to assess productivity, safety, and occupational health in indoor environments.

Gaps in the
Literature.Many researches regarding the detection of workers had been conducted.Some researchers used sensors attached to hard hats and other parts of body to track them; however, construction worker and hard-hat detection in real time using image-processing technique is a new method.There is an advantage in using image processing over sensor method to detect the workers and objects.The studies showed that the sensors used to track objects lacked accuracies.However the image-processing technique can accurately detect the workers and objects.In addition, there is no study conducted on hard-hat detection in real time.

Research Methodology
The visualization approach is a new technique.Nowadays, visualization technique, which is used as a proactive tool, can be a very useful to automatically detect construction workers as well as their PPEs.It consists of a set of CCTV cameras installed at the site, a network connection between cameras, an office computer (server), a server which acts as a data analysis computer in the office, display computers in the office, warning speakers installed at the site office, and cell phones to deliver safety rule violation alert messages.The visualization technique is divided into three parts: image input, image analysis, and image output.
Regarding image input, a set of high-resolution CCTV cameras are installed at the site, which take real-time images and send them to the office computer by means of a wired and or wireless network.Installing the cameras with proper overlap, stereovision can be achieved that can determine the exact location of the workers and/or objects.The cameras use charged-couple devices (CCDs) to capture high-quality video.The video is transmitted to the office computer using a wired local area network (LAN) or else a wireless network.
Regarding image analysis, the transmitted video is split into digital images.A video is a combination of several images.For this program, a one-second video is split into 32 images; then, each image is analyzed with an imageprocessing technique.When 32 images are analyzed, this is the analysis of the one-second video.During image processing, a worker can be detected using various methods, for example, walking pedestrian recognition or face detection [19].For this study, the face-detection method is used.When a worker faces the camera, his or her face is detected in an image or a series of images.This, then, is considered a worker that is detected at the construction site.Because more than one camera is installed at a site, a worker's face can be visualized as a front view to one of the cameras.As shown in Figure 3, once the program detects a worker, the face-detection program calls a hard-hat detection program, which checks whether a hard hat can be identified in the image.Similar to the face-detection method, various hard-hat detection methods have been developed.Two methods-using a sensor chip in the hard hat and by means of edge detection algorithms-usually are used [16,17,23].In this study, the edge of objects inside the upper head region that obviously includes a hard hat is drawn using the edge detection program.If the program finds a hard hat, as shown in Figure 3, the program understands that a "Safe Working Condition" exists.Then, the program executes the same procedure for other images; otherwise, it satisfies conditions to execute image output.
Regarding image output, if the workers are working without using hard hats, a warning message is triggered to three places: the office computer displays, the cell phones of concerned personnel (e.g., the construction manager and safety officer), and the speakers installed at the construction site.To deliver these messages, the program may use any of three kinds of probable networks: LAN wired networks to the office computers, a LAN wireless network, or wireless cell phone data.Details of the visualization technique are explained in Figures 2 and 3.

Face Detection Program Development
Face detection is an important step in the visualization technique.Two methods, sensor chip and face detection, are usually used.For the visualization technique using image processing, face detection is used.During data analysis, the face detection program checks the presence of faces in each and every image of the site surveillance.In this program, an important assumption in face detection to be considered is worker detection.Once the program detects one or more faces, it calls the hard-hat detection program.If any faces or workers were not detected in an image, it repeats the same procedure in other images.
Figure 4 (left side) shows a worker's face that is detected.In this program development phase, in order to track whether a face is detected, a black rectangular box around the face is displayed, indicating that a face is detected.Figure 4 (right side) shows a blue rectangular box at the upper head region of the person, which indicates that the program is searching for a hard hat on head.

Hard-Hat Detection Program Development
In the visualization technique (Figure 3), after the face detection program, the hard-hat detection program is implemented.The objective of a hard-hat detection program is to detect a hard hat by checking if a hard hat exists at the upper head region of that person.During implementation of this program, the following steps are executed.
(1) Focus on the upper head region, up to 12 inches above the face.(2) Apply the edge detection program on the upper head region, which converts the digital images into outlines of the objects.The process of converting images into outlines of the objects has three stages.First, the program uploads an image; the hard hat image shown in Figure 5 (left side) was taken in the Construction Management Laboratory of the UNLV for this study.Second, the RGB image is converted into a grayscale image, as shown in Figure 5 (middle).Third, the program converts the grayscale image into outlines of the objects as a product of the edge detection algorithm, as shown in Figure 5 (right side).(3) Hard-hat detection involves two conditions being fulfilled: first, the outline of hard hat is a semicircle, as shown in Figure 6, and the second, the color of the hard hat is red.(4) The hard hat tilt angle is found by a dot product of the cord-line row vector with the row vector (1, 0); the cord line is the line joining the ends of semicircles formed.(5) The results of dot product, calculated in Step Four, refer to the degree of the hard-hat rotation with respect to the -axis; the values zero and nonzero (in between −1 and 1) indicate that the hard hat is perfectly straight up and rotated with some angle, respectively.If the hard hat is found rotated, then it is rotated by −arccos about the  axis to convert into the normal position.(6) If logos or any special initials are presented in the hard hat, the hard hat is easier to detect.

Discussion and Conclusion
In this research, the software tool was developed in Microsoft Visual Studio 2012.During execution of the software tool, first, the program splits up the real-time video sent from the CCTV camera installed at the site at the rate of 32 images per one second of video.Then, the face detection program is applied in each image to detect a worker.The face detection program detects faces using a Haar-like feature.If the program detects a face, it calls the hard-hat detection program to execute.This program detects a hard hat by fulfilling two conditions, the red color of the hard hat and the outline of the hard hat that is semicircle.To find the outline of the hard hat, the program uses the edge detection algorithm.Since the program is able to detect more than one face and hard hat, if the number of hard hats detected is equal to the number of faces detected, the program constitutes a "Safe Working" message; otherwise, it dispatches a "Warning Message" to office monitors, cell phones of concerned personnel, and speakers installed at the site.The program development is in initial phase.Thus, under some conditions, the program may fail to detect faces and hard hats.A set of CCTV cameras need to be installed at sites such that a camera is able to take an image of a worker from the front; however, the cameras cannot take a front-facing images when the worker faces down while working.In such circumstances, the program cannot detect the faces and hard hats for the time being.Moreover, while executing the hardhat detection program, when the contrast between the hard hats and background color is not adequately high, the edge detection program cannot give a clear outline of the hard hats.When a worker moves quickly, sometimes, the program fails to detect the worker adequately.
The development of this program will help to save time, cost, and the life of workers at the site; however, at this stage, it will not completely reduce construction injuries and fatalities.Other factors, such as workers' behavior, types of workers, types of hazardous work, and the level of skilled and trained workers, all influence the amount of construction injuries and fatalities [25,26].Therefore, it is necessary that safety engineers at construction sites conduct in-depth analyses, including risk analysis, to reduce the amount of construction accidents.The tool developed from this research will help safety engineers to achieve zero-fatality in construction sites.
Further Study and Recommendation.In this initial stage of program development, ideal cases have been considered.This program was used with a laboratory scenario to test whether the program could detect the author's hard hat in real time.At present, efforts are underway to test this software at a real construction site by installing the CCTV cameras and transferring the real-time images.Another extension of the program is to detect whether the workers are wearing their vests; a third extension involves adding a program to detect a worker based on the outline of a worker and typical leg movements while walking.Additionally, the use of database management for all the workers such that the program can record all the workers' histories regarding safety-rule violations is being explored.Further study will continue until the program is able to detect effectively all the PPEs (vests, boots, globes, etc.).It will be easier to detect vests when using this program than to detect boots and gloves because the cameras presently cannot correctly capture the shape of the boots and gloves because of their small size compared to vests.

Figure 1 :Figure 2 :
Figure 1: A typical construction site where some workers did not use hard hat and some used it improperly.

Figure 3 :
Figure 3: Framework for identifying hard hats with a worker.

Figure 4 :
Figure 4: Implementation of face detection program.

Figure 5 :
Figure 5: Implementation of the edge detection program.

Figure 6 :
Figure 6: : Implementation of the hard-hat detection program.

Table 1 :
Fall fatality percentage by type of work [3].