An old iPhone 8 was converted into a solar-powered OCR server and successfully processed thousands of images in a completely off-grid environment

A brave soul has emerged who claims to have successfully processed 83,418
My iPhone 8 Refuses to Die: Now It's a Solar-Powered Vision OCR Server | TerminalBytes.com
https://terminalbytes.com/iphone-8-solar-powered-vision-ocr-server/
Hemant Kumar, a systems software engineer based in Canada, has a personal project that uses a lot of images, and he processes and automatically classifies hundreds of images a day. Normally, he uses a Mac or similar to perform this OCR processing. The reason is that 'Apple's Vision framework works very well on macOS,' Kumar explains.
However, Kumar felt that this was not interesting, so he turned his attention to an iPhone 8 that he no longer used but whose battery was still in good condition. He began to wonder if he could use this iPhone 8 as a 'solar-powered image processing server.' Kumar had a portable power source , EcoFlow RIVER 2 Pro , so he planned to combine it with the iPhone 8 to build a 'solar-powered image processing server.'

To achieve this, Kumar prepared the following four things:
1: A mini PC for running web servers, image processing servers, Plex servers, and other services
2: An iPhone 8 running a SwiftUI app that acts as both an OCR processor and a real-time dashboard
3: EcoFlow RIVER 2 Pro for solar power generation
4:
The workflow is very simple: the image processing service sends an image to the iPhone 8, performs OCR processing using Apple's Vision framework, and then sends the text output by OCR back to the image processing service, which then displays the processing status on a dashboard on the iPhone 8 screen.
Regarding building a server on iOS, Kumar said, 'It sounds complicated, but Apple has done most of the heavy lifting. The challenge was that iOS would decide that the app was not important and would not run it.'
Kumar praised Apple's Vision framework, which was used in this study, saying, 'Apple's Vision framework is really great and surprisingly underused. While everyone is talking about ChatGPT and cloud-based OCR services, Apple has quietly released a local OCR solution that is fast, accurate, and runs entirely on the device.'
In addition, he used SwiftUI to build a dashboard that allows users to check the progress of OCR and image processing. Kumar used Google Analytics 4 to design the dashboard so that users can check the total number of users, monthly number of users, average session time, number of active users, and more. Kumar praised his dashboard, saying it was like a small data center dashboard.

The iPhone 8, acting as an OCR server, is very efficient, consuming 0.5-1W of power when idle and 2-5W when active. On the other hand, a mini PC running multiple services consumes 15W of power when idle and 25-30W when active.
On the other hand, the EcoFlow RIVER 2 Pro's daily power generation is said to be '150 to 220W' in the summer, but in the spring and fall, it is about '20 to 60W' on average, and in the winter, even if you're lucky, it seems to be about '5 to 20W'. So, Kumar introduced a seasonal approach. In the summer, he charges all devices with solar power, but in the spring and fall, he combines solar power generation and battery power supply, and in the winter, he relies on battery charging.
With this approach, Kumar has been running a solar-powered image processing server on an iPhone 8 for over a year, and the battery status of the iPhone 8 is good. Kumar writes that the EcoFlow RIVER 2 Pro's 768Wh battery capacity 'provided enough margin for the unpredictable Canadian weather.'

The cost for Kumar to build a 'solar-powered image processing server' that runs on an iPhone 8 is as follows. The iPhone 8 is not included in the cost because it is an old one.
・EcoFlow RIVER 2 Pro: 599 Canadian dollars (approximately 63,400 yen)
・220W solar panel: 180 Canadian dollars (about 19,000 yen)
Cable and mounting hardware: 50 Canadian dollars (approximately 5,300 yen)
・ Additional solar power generation equipment: 230 Canadian dollars (approximately 24,300 yen)
'The economic benefits are modest, but they are certainly there,' Kumar said. Before the introduction of the 'solar-powered image processing server' that runs on an iPhone 8, monthly power consumption was 45.8 kWh (8.82 Canadian dollars: about 930 yen), and after the introduction it dropped to 37.4 kWh (7.21 Canadian dollars: about 760 yen), so he estimates that this will result in annual savings of about 84 to 120 Canadian dollars (about 8,900 to 12,700 yen).
Cloud OCR services usually cost 1-1.5 Canadian dollars (approximately 110-160 yen) per 1,000 requests. Therefore, it is estimated that it would cost about 83-125 Canadian dollars (approximately 8,800-13,200 yen) to process more than 83,000 requests. In addition, using external services can raise privacy concerns, so the benefits of operating your own OCR server are explained.

'The reliability of the hardware is amazing, and the iPhone 8 has been in continuous operation for over a year and is still running smoothly today. There has been no noticeable degradation in performance, even under constant load,' Kumar said.
He adds: 'iOS backgrounding works better than you'd expect if you find the right approach. The key is to properly take advantage of background app refresh and keep your HTTP server active with periodic requests.'
In addition, Apple's Vision framework seems to evolve over time, and OCR that previously failed has become perfect over time, 'working fine with handwritten text and special fonts,' Kumar said.
Related Posts:
in Hardware, Posted by logu_ii