"The Night Watch" is one of Rembrandt's most famous paintings ( Credit: Rembrandt/ Public domain/ Wikimedia Commons)

Snipping off the sides of an acclaimed painting to fit an assigned space would be unheard of in modern times. But that is exactly what was done to one of Rembrandt van Rijn's most famous works, The Night Watch, almost 300 years ago. Now, Amsterdam's Rijksmuseum has finally managed to restore the painting to its original glory with the help of artificial intelligence (AI).

The Night Watch was commissioned in 1639 by Frans Banninck Cocq, the captain of Amsterdam's civil militia, and depicted him (in black with the red sash) and his 17 members. It was completed in 1642 and spent more than 70 years in the banquet hall of the civil militia it was based on.

In 1715, Dutch officials decided to move the painting to the city hall in Amsterdam's Royal Palace on the Dam. The almost 12-foot by14-foot artwork was too large to go through the doors, so the movers decided to cut the edges. They took off about 2 feet from the painting's left side and about 5 inches from the right. They also took off 9 inches and 5 inches from the top and bottom, respectively. The strips were never recovered. However, art historians have been aware of the missing items thanks to a smaller replica of the original scene painted by Dutch artist Gerrit Lundens.

In 2019, officials of Amsterdam's Rijksmuseum, where the painting has been displayed since 1808, decided to recreate the missing sections. The endeavor was part of the multimillion-dollar Operation Night Watch Project to determine how best to preserve the masterpiece for future generations.

To help them with the reconstruction, the team, led by the museum's senior scientist, Robert Erdmann, turned to a new AI algorithm. Called Convolutional Neural Networks, it helps computers figure out what images may have once looked like. The scientists scanned high-resolution images of the original and Ludens' painting to the computer. The AI was able to study and correct the painting's perspective. It also recognized the exact colors used by the Dutch master and could even mimic his brushstrokes.

The "missing" strips were printed and mounted to the painting, allowing visitors to view the image as Rembrandt had intended. The left side included two men watching the event and a young boy running away from the militia. A drummer and a barking dog were added to the painting's right side.

"The Night Watch" with the missing sections restored (Credit: Rijksmuseum)

“It is spectacular because what Rembrandt painted was Captain Franz Benninck Cocq ordering his lieutenants to march out, and that is now exactly what you see,” said Taco Dibbits, director of the Rijksmuseum. “With the addition, especially on the left and the bottom, an empty space is created in the painting where they march towards. When the painting was cut, [the lieutenants] were in the center, but Rembrandt intended them to be off-center marching towards that empty space, and that is the genius that Rembrandt understands: you create movement, a dynamic of the troops marching towards the left of the painting.”

The AI helped the museum reproduce the best possible version of the missing pieces. But Dibbits remains optimistic that the original painting strips are still around and will be returned to the museum some day. The restored painting will be available for visitors to view until September. It can also be seen online on the museum's website.

Resources: Theverge.com, www.rijksmuseum.nl, BBC,com