Posts

Fixing a TensorFlow Lite model loading error in a preview build

Image
 In my previous post, I described how I moved K-Pop Celeb Like Me from a WebView implementation to a local React Native app. I also explained why I switched from TensorFlow.js to TensorFlow Lite after finding that image prediction was too slow on Android. After getting the basic image recognition feature working, I moved on to testing preview builds on real devices. That was when I encountered another problem: the model worked during development, but the app could not load it in the Android preview build. In this post, I will explain the error, the cause I identified, and the change that allowed the model to load successfully in both Android and iOS preview builds. The model worked during development but failed in the APK My app uses image classification models exported from Teachable Machine. I bundled the TensorFlow Lite model files and their corresponding label files inside the project. The model-loading function initially looked like this: export async function loadModel(g...

WebView to local app: testing on-device image recognition

Image
 When I started developing K-Pop Celeb Like Me , the app was originally built as a WebView app. The main feature was simple: users could select or take a photo, and an image classification model trained with Teachable Machine would predict which K-pop celebrity looked most similar to them. The web version already worked, so I initially considered keeping it as a WebView app. However, before developing more features, I wanted to check whether I could run the same model directly inside a React Native app. There were two main reasons for this experiment. First, I wanted to reduce the app's dependence on a separately hosted website. Second, I wanted to see whether running image recognition locally would provide a better experience, especially on Android devices. This post describes my initial traffic investigation, my first attempt using TensorFlow.js, and the performance improvement I observed after switching to TensorFlow Lite. Why I considered moving away from WebView My website was...

About K-PopRama Slang app

Image
  I made a Korean Slang dictionary app specifically for trendy words used in K-Pop & K-Dramas. I built this to help fans fully enjoy the content without missing any subtle jokes or meanings. Please check it out, and any feedback would be very appreciated! If you have any question or request for bug fix, slang words addition, etc. etc. pleaes leave some comments here or you can send me email to: developer.anchubby@gmail.com - K-PopRama Slang (Free version) Android: https://play.google.com/store/apps/details?id=com.taehyeonkim345.kpopramaslang iOS: https://apps.apple.com/app/k-poprama-slang/id6782297211 - K-PopRama Slang Plus (No ads version) Android: https://play.google.com/store/apps/details?id=com.taehyeonkim345.kpopramaslang.plus iOS:   https://apps.apple.com/app/k-poprama-slang-plus/id6782601678 Key Features:   1990s ~ Present trendy words 1,000+ Words & Growing Search by Artists & Shows Learn by Daily Flashcards

Calculating idler gear shaft deflection angle using Castigliano's theorem

Image
  During my work on tractor transmission development, I frequently used formulas from engineering textbooks to evaluate shaft deflection and angular rotation. Castigliano's theorem was particularly useful because many common loading configurations had already been covered in my university textbooks. However, I encountered a loading configuration during idler gear development that I could not directly find in my reference materials. I needed to calculate the angular deflection at a bearing location, so I derived an expression using the principles of Castigliano's theorem. This post documents the engineering problem, the calculation process, and why the resulting angular deflection was important for the bearing design. 1. Why Was Deflection Angle Important? The idler gear shaft had to fit into a limited space within the tractor transmission. The idler gear received an external force from its mating gear while transmitting power through the gear train. The shaft was supported by b...

How profile shift affects gear addendum and tip diameter

Image
During my work in transmission research and development, I often studied engineering formulas to understand how they were derived rather than simply memorizing them. When I encountered a formula in a technical reference book, I liked to work through the derivation myself whenever possible. This approach helped me understand the underlying principles, remember the relationships more effectively, and apply them to different engineering problems. While studying profile-shifted gears, I became curious about why the addendum and tip diameter of one gear could depend on the profile shift coefficient of its mating gear, as well as the center distance correction coefficient. Instead of accepting these relationships as given formulas, I used basic gear geometry to investigate why they occur. This post documents that derivation and the geometric relationship behind the result. 1. Understanding the Gear Geometry A profile-shifted gear is generated with a profile shift that changes the position of...