Blur Stuff
- 24 Devlogs
- 126 Total hours
Automatically detect and anonymize faces, license plates, text, and PII in images, videos, and documents.
Automatically detect and anonymize faces, license plates, text, and PII in images, videos, and documents.
Since shipping Blur Stuff, I got feedback that the frontend felt too generic so I completely revamped the UI to give it a more intentional and fun style.
I redesigned everything from colors to typography and everything else. Now the app has a more personal feel. I also cleaned up some small things here and there.
Since the previous dev log, I have been focused on getting Blur Stuff ready for deployment. This ended up being much more painful than I expected.
The biggest part was dealing with dependency issues. The project worked locally, but moving everything to a production environment exposed a bunch of problems with Python versions, PaddlePaddle, PaddleOCR, PaddleX, PyYAML, spaCy, OpenCV and other dependencies. I spent a lot of time testing different configurations, fixing dependency conflicts, debugging the production container, and figuring out why things that seemed to work okay locally were breaking during deployment.
The biggest headache was PaddleOCR. I had to deal with missing system libraries, model downloading, Paddle initialization issues and eventually a oneDNN runtime error that was causing OCR requests to return 503s. After a lot of debugging and testing different configurations, I eventually got the OCR pipeline working properly in production. That was probably the one of the most frustrating parts of the entire project, but it is finally done.
I also switched the spaCy model from en_core_web_lg to en_core_web_sm. The larger model was unnecessarily heavy for what Blur Stuff needs and was making deployments take way longer. Switching to the smaller model made deployment faster and also improved performance without having a noticeable impact on the PII detection quality. After successful deployment I finished the README and added the final assets, screenshots, logo and documentation. I added the MIT license, favicon, deployment related changes and generally cleaned up the entire repository.
At this point, I think Blur Stuff is ready to ship. There are definitely still improvements I could make, especially improving performance, making video anonymization more reliable and efficient, and polishing various parts of the application but I don’t want to spend more time trying to make everything perfect. The current deployment is also running on Railway’s free plan, so there are some resource and memory limitations since Blur Stuff runs several machine learning models in the same process. For now, I’m okay with that rather than spending more time optimizing around the limitations of a free deployment.
For now, I’m calling it finished and shipping it since the core functionality is working and the project is deployed. I’ll definitely come back to Blur Stuff later to improve it, but I think it’s time to move on to something new.
Since the previous dev log, I worked on fixing the remaining issues in the anonymization workflow and finishing the frontend around the application.
The biggest thing I worked on was selected video anonymization. There were still some problems where selected areas could stop being anonymized correctly or the anonymization could move away from the actual object as it moved through the video or retracking when something like a face was lost. I spent quite a lot of time testing different things, tracking down where the problems were coming from, and making the selected anonymization much more reliable across video frames. This ended up taking a lot more work than I initially expected, but the selected video workflow is now working much better. It still isn’t perfect and there are still some bugs and I think I probably need a lot more time to find and fix them but right now it is in a decent working state so I don’t plan to spend more time on achieving perfection because debugging and stuff is boring as hell.
I also made some improvements to the overall frontend and added the remaining main pages. I added the about, arivacy, documentation pages and also did some other improvents around the frontend. The documentation now explains the available endpoints, detection targets, anonymization modes and other features.
At this point, I feel like the main application is in a really good place. The core functionality is implemented, the main frontend workflow is complete, and the remaining work is mostly getting this thing hosted and stuff.
Next, I plan to write the README file, host the application, and do a final round of testing and cleanup. After that, I think I’ll consider this project finished for a while (I will work on improving it further later) and move on to building something new.
Since the previous dev log, I continued building the application workflow and have almost completed the anonymization process.
I first worked on the anonymization routes and updated the backend so that the frontend can send detected regions back to the API and have them anonymized. This allows the user to choose which detections they want to anonymize instead of always having to process everything. I also added support for passing dynamic padding (and also made it so that other dynamic stuff is easy to add later) through the request so that the effects can be customized based on what the user wants.
I also added client side file handling required for the results page. The original and processed files are kept available in the browser so they can be previewed and downloaded without needing to be stored on the server. Everything also handles missing files and stuff without breaking and I also added error handling with notifications which are displayed to the user. I also made a bunch of smaller UI improvements while connecting everything together.
At this point, the main frontend workflow is coming together. Next I will fix small remaining issues and improve reliability rather than adding any major change.
The next things I plan to work on are to mainly fix bugs in the code. Like GIFs still need some additional handling to make sure detections are applied across the animation rather than being treated like a normal image and the existing video tracking system is able to follow detections across frames, but during testing I noticed that the anonymization can drift away from the actual detected regions in videos. This is the major thing I need to fix. And I also plan to do some small changes to the UI and stuff and fix some bugs there before adding the remaining pages like the API and documentation pages.
Since the previous dev log, I continued building the application workflow and moved beyond the initial upload interface into review/customization functionality.
I first worked on the file preview system so that uploaded files can be displayed correctly even when the browser cannot natively display them. Now a preview is generated for unsupported images and documents while keeping browser previews for files that are already supported.
After that, I built the results page, which is where the user can review the detections found in their uploaded file and also customise stuff for anonymisation. The biggest addition was the detection review panel. Instead of simply processing everything automatically, the interface now shows the detected content which will allow users to review individual detections and choose which ones they want to work with.
A lot of the work also went into the smaller UI/UX improvements. I also fixed a ton of issues that came up while connecting the different pieces together and handling the detection data and working with different file formats.
At this point, the frontend is starting to really come together and look like a real app. The next step is to connect stuff to my anonymization API. The user will be able to to select specific detections, choose how they want them anonymized, and add other customizations.
Since the previous dev log, I continued working on the frontend and have now finished the main landing page as well as the initial anonymize/file upload page.
I first started by completing the remaining parts of the landing page by adding the footer, API description section, and some final component layout and CSS improvements. After that, I started building the anonymize page, which is where the actual application workflow begins. I implemented the complete upload interface with both file selection and drag and drop feature. I also added client side file handling so uploaded files can be passed from the landing page to the anonymize page without having to upload them to the server first.
To do this, I implemented a small IndexedDB based file storage system in the browser. Uploaded files are temporarily stored locally with a timestamp allowing the anonymize page to retrieve the file when the user arrives there. The stored file automatically expires after a short period and is also removed once it has been retrieved. This keeps the upload flow client side and also avoids putting the file data into the URL or sending it to the backend before processing when not needed.
The anonymize page now also handles different file types correctly and displays a preview based on their type. I also added different anonymization options making it straightforward to pass the processing preferences to the backend. I too spent time fixing bugs and adding small UX improvements across the new frontend functionality.
Next I am going to connect the interface to the backend API and build the actual processing experience. Rather than anonymizing everything automatically, I will create a processing page where the user will be able to decide what to anonymize and I will probably add more customization.
Since the previous dev log I’ve been completely focused on the frontend. I first set up the frontend stack by integrating Tailwind CSS for styles and Alpine.js for lightweight interactivity. I also created a reusable layout with shared components such as the header that future pages can be built consistently and easily.
With that foundation in place, I began implementing the landing page. I designed and built the hero section, which consists of a cool drag and drop upload area, and an interactive before/after comparison slider that allows users to visually compare original and anonymized images, which makes the landing page looks awesome.
Besides frontend work, I made a few backend improvements as well, including cleaning up temporary video files after processing to avoid leaving unnecessary files behind as originally they weren’t properly disposed of.
Next I plan to continue working on the landing page for a bit by adding a footer and maybe some other useful section before connecting everything to the existing API and implementing the upload and processing workflow and building the remaining pages needed.
I focused on preparing everything for the frontend rather than adding new features. I reorganized the API by moving all routes into a dedicated package and grouping every endpoint under /api/v1. This gives everything a much cleaner structure and makes everything look professional.
I also added detection endpoints for all supported files. Before the project was primarily focused on anonymization, and even though I had a detection endpoint, it only supported images and was buggy. These new endpoints allows receiving detection results directly without applying any effects and serve as a foundation for selective anonymization that I will implement later. While implementing these endpoints, I refactored how detection IDs are handled across the application. Before they too were buggy but I got them to work.
I not only worked on the backend but also worked on the frontend by laying out it’s initial structure that I will build upon. I also spent some time cleaning up the codebase by removing unused imports and simplifying parts of the project.
Now I plan to really start working on building the frontend. Now that the API structure is in place, I want to focus on creating a professional looking interface that allows users to interact with all of the functionality that has been implemented so far plus more.
I expanded the range of file types that the application supports. Image support now includes TIFF/TIF, HEIC/HEIF, and GIF files. HEIC/HEIF images are automatically converted to PNG after processing since they are not widely supported for encoding.
I also added support for documents which include PDF, DOCX, PPTX, and XLSX files. Rather than building separate anonymization logic for every Office file format, they are first converted to PDF and then are annonymized the same way as PDFs which keeps the implementation much simpler.
While working on adding support for these files, I noticed that I had a bunch of duplicated code. So I spent some time refactoring stuff and removing duplicated stuff. I also found that GIF processing was slow so I worked on making it faster by treating it the same as a video and using trackers on it rather than running detection on every frame.
I also made few smaller improvements, including adjusting the confidence thresholds for some of the detectors since I was noticing a bunch of false positives and fixing several bugs that came along the way.
The next thing I plan to work on are cleaning up the code by finding and removing unused stuff, and then building the frontend for the application.
I focused on improving the performance and maintainability of the anonymization system rather than adding new features. The biggest change was a refactor of the video anonymization system. Instead of repeatedly creating new anonymization masks for every frame, the tracker now caches and reuses them wherever possible. This reduces unnecessary work during video processing and also makes it easier in the future to add further performance improvements.
I also improved the applications behavior by preventing both full text anonymization and PII anonymization to be selected at the same time since these targets overlap and would produce redundant processing. I also cleaned up several parts of the codebase by removing unused code and making the everything a bit easier to maintain.
I also spent a lot of time experimenting with more aggressive optimization techniques but after testing, I decided to postpone those changes because they added complexity without providing the improvement I was looking for (and they were kind of buggy and it would take a lot more time to fix them). Instead, I decided to focus on optimizations that are simpler.
Right now I don’t plan to work on improving the performance (even though there probably are tons of improvements to be made) because that stuff is boring and difficult as hell. Instead I’m going to add support for more file types like PDF.
I expanded the anonymization system by adding multiple anonymization modes instead of having only the pixelization effect. The application can now switch between anonymizing regions using blur, solid fill, noise, emoji overlay, and inpainting. The emoji overlay right now is pretty basic but I plan on improving it later.
I also improved the quality of face anonymization by replacing rectangular masks with elliptical masks (for some of the effects), producing better looking results. I also refactored the anonymization pipeline to separate anonymization effects from overlay rendering making future additions even easier and also cleaned up and reorganized the existing image effect implementations to improve readability and consistency across the project.
Next, I plan to improve the performance of the anonymization system by trying to reuse detection targets and effect masks wherever possible.
I improved the overall quality and efficiency of the video anonymization system. I updated detection intervals to use the video’s frame rate instead of relying on a hard coded number of frames. This allows the system to adapt well to videos with different frame rates.
I also evaluated several object tracking algorithms, including DaSiamRPN, to find a good one that balances accuracy and speed. After comparing the performance of a bunch of them, I switched to Nano Tracker which was faster than my original KCF and CSRT trackers while being more accurate.
I made additional improvements to privacy by removing metadata from exported videos. I am now also applying EXIF orientation before processing ensuring that images taken from different devices are processed in their correct orientation.
Next, I plan to introduce different anonymization modes like blur and solid black boxes.
I focused on adding support for videos. I first implemented a basic video anonymization system so uploaded videos could be processed the same way as images. I also made sure that the audio for the video is preserved so that it carries over to the anonymized video being unchanged.
After getting the basic system working, I improved how videos are processed by adding object tracking and scene change detection. Instead of running detections on every frame, the system can now follow previously detected objects across frames and automatically run detections again when needed (when a tracker is lost, or the scene changes drastically, or periodically after a set amount of frames). This provides a great performance boost while the result stays reliable.
Next, I want to continue improving video processing by optimizing it further and making it more accurate.
I focused on improving the entire OCR system, as the previous approach with EasyOCR was missing too much text and reducing the accuracy of the entire system. After spending quite a bit of time trying to improve it, I decided to replace it with PaddleOCR. Now more accurate text detections are being produced making the entire program more robust.
After, I expanded the regex based detectors to also account for URLs in addition to emails, etc. I also improved the phone number detection logic to reduce false positives and improve overall accuracy. Then, I adjusted padding around blurred regions so that stuff is covered more consistently and without blurring unnecessary content.
The last thing I did was optimizing PaddleOCR as it was much slower than EasyOCR. After a lot of tinkering I was able to significantly reduce its processing time. For some files it now performs at roughly the same speed as EasyOCR while being way more accurate.
Next, I probably want to add support for more file types and ultimately videos. And later also support for multiple languages.
I added a new way for the app to detect personal information by using named entity recognition. Previously, the app could only find structured information like emails and phone numbers, but it could not detect things like names. So I integrated Presidio to identify such information from the text extracted from images. These extractions are then combined with the existing PII detections done using regex for the structured stuff. This improves the accuracy of the entire system by combining multiple detection methods instead of relying on one single approach.
Next, I will improve the detection process further as right now it isn’t too accurate, mostly because I think the OCR is missing some stuff from the text. So I might try replacing it or find some other way.
I implemented PII detection, allowing the app to identify and blur sensitive information within the text extracted from images instead of blurring everything blindly. First I used regular expressions to detect structured data such as email addresses, phone numbers, etc. But OCR frequently omitted punctuation, causing many valid emails to be missed. To fix this, I redesigned the everything around an OCR token graph. Each token stores its bounding box, neighboring tokens, and line information, allowing the detections to be more accurate. I might switch to PaddleOCR again or someother ocr so that I get more accurate detections. I also spent time improving the overall design of the PII detection system. These changes make it easier to extend in the future while improving the accuracy of the detected regions that are blurred.
Next, I will implement NER based detection to identify unstructured personal information such as names.
I implemented OCR-based text detection, allowing the application to detect text within uploaded images. I initially used PaddleOCR, but found that it took over 30 seconds to process a single image. After spending a lot of time trying to optimize its performance, I decided to switch to EasyOCR, which reduced the processing time to around one second while maintaining the same detection quality. Switching the OCR engines was well worth it. I also tried to keep the OCR implementation consistent with the face and license plate detectors and also optimized them too.
Next, I will implement detection of sensitive information within the extracted text using regular expressions and NER. This will allow the application to distinguish ordinary text from personal information such as names, emails, phone numbers, etc, and allow me to blur only the relevant regions (right now the the entirety of the detected text is blurred).
I expanded the application by adding support for license plate detection and blurring. The app can now detect both faces and license plates in an image and blur them.
I also made the API more flexible by allowing users to choose what they want to anonymize. Instead of always processing everything, they can now select whether to detect faces, license plates, or both. This makes the application more efficient and easier to extend with new features in the future.
I also improved the structure of the project so that adding new types of detections will require much less work. I also added unique ids to each detection, which will be useful for future features that let users blur individual detections.
Next, I will implement detection of sensitive text within images. This will allow the app to identify information such as email addresses, phone numbers, and other personal details, then blur them.
I focused on improving the backend rather than adding new features. I reorganized the API by splitting it into smaller, more focused endpoints. For example, there’s now a dedicated endpoint that only detects faces and returns their locations, while separate endpoints handle image anonymization and API health checks. This makes the API easier to use and gives me more flexibility as I add new features.
I also reorganized the detection system so that all object detection goes through a single service. At the moment it only detects faces, but it’s now much easier to add support for other types, such as license plates, without having to redesign the rest of the application.
Health check endpoints let the application report whether it’s running correctly and whether the AI models have loaded successfully.
Next I’m going to add detection beyond faces by adding license plate detection. These changes are gonna make it much easier for me to do so.
I spent some time refining the face anonymization system. The pixelation effect was completely reworked to produce smoother, better looking results while blurring the faces more accurately (using the previous blur you could sometimes make out the features of the people). I also cleaned up the implementation, making the blur functionality much simpler and easier to maintain and most importantly I made it more reusable for ease of use in the future for more features.
Behind the scenes, I also reorganized the project’s Python environment by removing unused libraries and recreating the virtual environment. Next I am planning to either add support for videos or make the API better by creating more focused routes such as one that only detects faces and other that returns the blur image. I also want to add functionality where the user can select which people to anonymize instead of blurring everybody detected.
After that, I’ll expand beyond simple face anonymization by adding support for automatically detecting and anonymizing other sensitive information, such as license plates, documents, and other personally identifiable content.
Replaced the temporary grayscale filter with automatic face anonymization. Uploaded images are now scanned for faces, and every detected face is pixelated. I also improved detection accuracy to reduce missed faces by tweaking a bunch of stuff for a while and adding more functionality to my face detection like running the image at multiple sizes. A lot of my time was also spent making the pixelated effect look good. I first went for only blurring the faces but now the face is pixelated along with a smooth transition into the surrounding image making the effect look pretty good. Right now images with large crowds are correctly blurred, including people who are far away or appear very small in the image.
Integrated OpenCV so uploaded images are now decoded, processed, and returned to the client. I also introduced modularity into the code by creating separate modules for each step. The grayscale filter is only a temporary placeholder before I implement functionality such as blurring faces.
Added image upload functionality with validation for missing files and non image uploads. The API right now only returns basic metadata about the upload. Next I’ll integrate OpenCV to begin the image processing stage.
Set up the project’s foundation by creating Flask application structure, initializing Git, creating a virtual environment, and organizing the codebase for future features. I also got the development server running to verify everything is wired up correctly. Next, I’ll implement image uploads.