ml and software engineer · marrakech, morocco

Mohamed Hassani

I build the software around machine learning.

From exhibition kiosks and robot control to document search and model evaluation, I work on the parts that make an AI system usable.

An AI generated portrait produced by the ArtFusion kiosk pipeline, a figure in a field at dusk in a painted style
FIG. 01stable diffusionsdxl + instantidcontrolnet structurelora, per client

fig.01 / generative kiosk · 2024

01

Featured work

Systems I built, tested, and learned from across computer vision, generative AI, robotics, NLP, and backend engineering.

01

ArtFusion Interactive AI Portrait Kiosk

generative ai · product

A portrait experience made for exhibition visitors, not for a notebook.

Built the technology for a kiosk rented by exhibition clients. A visitor could take a photo, receive a personalized portrait with the client's visual identity, get a print on site, and open a digital copy through a QR link.

The system had to work in public, with changing lighting, groups of people, a touchscreen, a printer, and no developer standing beside it to repair every failure.

The visitor flow

The PyQt6 application guided a visitor from the camera to the form, generation, printed result, and QR delivery. Touch input was available, but hand gestures also allowed someone standing away from the screen to start and control the experience.

The generation work

The image pipeline used Stable Diffusion with ControlNet and LoRA so the person could remain recognizable while the visual treatment changed for each exhibition. I tuned the pipeline for low light, several people in one photo, and generation in under 30 seconds.

  • A complete public experience rather than an image generation demo.
  • Touch and gesture control for people standing at different distances from the kiosk.
live kiosk · screen and 3d totem · drag to rotate · timeline controls below
02

Autonomous Robot Control with Vision and Deep RL

reinforcement learning · robotics

A camera based control platform for learning how an indoor robot should move.

Built a Python platform that combines camera localization, obstacle detection, simulation, and a PyTorch Deep Q Network. The aim was to let an agent move toward a target while learning how to avoid obstacles instead of hard coding every path.

A physical robot and an expensive indoor mapping system were not available, so the project separated the vision problem from the control problem. A camera and printed markers supplied a real world position signal, while the navigation policy learned inside a simulation.

Seeing the room

Two reference ArUco markers defined the mapped area and corrected the camera perspective. A target marker supplied the position of the target, while green shapes in the camera view could be treated as obstacles. The localization code returned positions and a usable view of the room instead of raw camera coordinates.

Teaching the agent

The DQN received a compact state built from the simulated sensors, orientation, target direction, and obstacle information. It chose between a small set of movement actions, stored transitions in replay memory, and updated the network while the simulated robot moved.

  • Camera calibration, perspective correction, marker localization, and obstacle masks.
  • A simulation where training and movement could happen together.
live arena · ink obstacles · drag the target · tune the robot
03

Resume Search Engine and Finance Document QA

llms · retrieval

Two different ways to make a document collection useful through questions.

Built two retrieval systems for two different document problems. The first searched PDF resumes and returned relevant candidates with generated summaries. The second explored how a finance document system could check its evidence before answering.

The interesting part was not putting a chat box in front of a language model. It was deciding what to retrieve, how to keep the source document attached to the answer, and what to do when the first retrieved passage was not good enough.

Resume search

The resume application loaded PDF files, split their text into smaller pieces, created embeddings, and kept them in a persistent Chroma index. A natural language query retrieved the closest resumes, produced a summary for each result, kept page and source metadata, and exposed the results through a FastAPI service and a Streamlit interface. The original resume could still be opened from the result.

Finance documents

The finance project started with the familiar retrieve then answer flow and developed into a graph of retrieval and checking steps. It parsed documents, retrieved passages, judged document relevance, checked whether the answer was supported by the retrieved text, and tried retrieval again when the evidence was weak. Web search was a fallback rather than the first source of truth.

  • Natural language search over PDF resumes with a summary and source document.
  • A finance question answering flow that can retrieve again when its evidence is weak.

fig.03a / resume search

  1. 01pdf corpus
  2. 02chunk
  3. 03embed
  4. 04chroma
  5. 05retrieveqa
  6. 06llm summary

fig.03b / finance documents · adaptive

  1. 01llamaparse
  2. 02chunk
  3. 03fastembed
  4. 04qdrant
  5. 05retrieve
  6. 06grade
  7. 07answer

if a grader fails, retrieve again or use web search

02

About

My work sits between machine learning and software engineering. I have built data collection and preparation pipelines, trained computer vision and language models, exposed them through APIs, and integrated them into applications and hardware. I started in educational robotics and later worked across visual search, OCR, document understanding, conversational AI, generative image systems, and software engineering evaluation for language models. The project section shows the systems themselves; the experience section gives the work context.

03

Experience

Work across products, data, models, interfaces, and the people who use them.

01

AI Training Software Engineer

outlier · remote · contract

Aug 2024 to Present

I create and solve software engineering tasks used to train and evaluate language models. The work is close to code review, but it also requires designing the situation that the model has to understand.

  • Designed tasks covering debugging, code generation, refactoring, optimization, testing, API development, and algorithms.
  • Wrote and reviewed Python, JavaScript, Java, C++, and Swift code across different architectures and programming styles.
  • Compared generated implementations for correctness, security, performance, maintainability, readability, and missing requirements.
  • Rewrote incomplete solutions and explained the edge cases, performance issues, and reasoning errors that made them fail.
  • Created realistic developer scenarios and reviewed other contributors' work before submission.
02

Co founder, ML and Software Engineer

artfusion · casablanca, morocco · founder

Jan 2024 to Dec 2024

ArtFusion built interactive kiosks rented by exhibition clients. Visitors took photos, created personalized portraits, received a branded print on site, and accessed a digital copy through a QR link after completing the client form. I owned the technical system behind that experience.

  • Defined the hardware setup with an embedded Linux workstation, NVIDIA GPU, touchscreen, cameras, and thermal printer.
  • Built the main PyQt6 application for touch and hand gesture interaction, with configurable content and visual identity for each exhibition.
  • Designed the image generation pipeline with Stable Diffusion, ControlNet, and LoRA, reaching generation times under 30 seconds in difficult conditions such as low light and group photos.
  • Developed backend services for sessions, telemetry, forms, collections, user data, content delivery, and QR access.
  • Optimized memory and inference, integrated the Linux hardware, and handled deployment, testing, and on site reliability.
03

AI QA Analyst

advon commerce · remote · contract

Jul 2023 to Dec 2023

Worked on data quality projects for language model training, where the useful output was not just an annotation but a reliable example that another model could learn from.

  • Validated large datasets against detailed annotation guidelines as the project requirements evolved.
  • Reviewed generated text for accuracy, consistency, usefulness, and errors that could affect later training.
  • Investigated ambiguous cases, explained the problem, and escalated issues when the written guidance was not enough.
  • Worked with a distributed team while keeping the review process consistent across many examples.
04

Machine Learning Engineer

beewant · marrakech, morocco · full time

Apr 2022 to May 2023

Owned multiple machine learning projects from data collection and preparation through model development, training, deployment, and API integration. The work covered object detection, OCR, document understanding, visual search, image generation, and the annotation tools and data pipelines that connected them.

  • detection and segmentationBuilt and deployed computer vision systems for object detection and segmentation. Trained DETR and YOLO model variants, prepared the training data, and converted models for faster inference in applications.
  • document aiBuilt invoice and receipt extraction from input formatting through text detection and structured document understanding. Compared the results with AWS Textract and prepared the inference path for batch processing and service use.
  • search and data collectionBuilt an image search and retrieval system over marketplace data, including collection, metadata lookup, image representation, indexing, and similarity search. Built scraping pipelines with multiple workers, retries, rate limits, and deduplication across different sources.
  • services and annotation toolsTurned models into inference services and connected them to APIs. Maintained annotation workflows and built frontend and backend tooling for segmentation data, including mask encoding that could move between Python, JavaScript, and TypeScript.
  • generative visionWorked on image restoration, image captioning, content moderation, Stable Diffusion experiments, and a trained image generation model packaged for serving.
  • Designed data pipelines for cleaning, validation, augmentation, annotation, and dataset conversion before model training.
  • Deployed trained models as reusable inference services and connected them to the applications around them.
  • Worked across Python, Node.js, and TypeScript when the machine learning system crossed into product tooling.
05

Data Science Intern

peaqock financials · casablanca, morocco · internship

Apr 2021 to Sep 2021

Built a conversational AI assistant for mental health support as my master's end of studies project. The work moved from finding usable dialogue data to training models, designing conversation flows, and deploying a web application and API.

  • data collectionBuilt scraping pipelines with Selenium and Beautiful Soup to collect conversation examples from public websites, forums, Reddit, support communities, and other online sources. I also explored extracting useful material from mental health podcasts.
  • model experimentsCleaned, normalized, and deduplicated the data before experimenting with several generative language models. Fine tuned GPT 2 and DialoGPT with Hugging Face Transformers for supportive dialogue.
  • conversation and deploymentCombined generative responses with structured conversation flows in Rasa, then deployed the chat application and REST API with Flask on Google Cloud Platform.
  • Connected web data collection, dataset preparation, model training, conversation control, and deployment in one project.
  • Built a working application rather than stopping at a language model experiment.
06

Research and Development Intern, Robotics Projects

ibdaa for science and education · meknes, morocco · internship

Apr 2018 to Jul 2019

Designed robotics projects for an educational company, where the work had to be understandable to students, possible with available parts, and reliable enough to demonstrate in front of people. The two internships covered a physical robot and a separate autonomous control platform.

  • wireless robot, apr to jul 2018Designed a differential drive chassis and a 2 DOF gripper in Fusion 360, with the chassis planned for laser cut manufacturing. When custom manufacturing exceeded the available budget, the final work used an accessible robot chassis while the arm, firmware, and control system were developed for the course.
  • autonomous control platform, apr to jul 2019Built a Python platform for indoor navigation with a Flask server handling control commands for a physical robot over Bluetooth serial communication. Built Pygame simulations to compare navigation behavior across indoor scenes, then added camera localization with OpenCV and ArUco markers, including perspective correction and real time position estimation.
  • Programmed Arduino firmware for DC motors, servo motors, and Bluetooth serial communication.
  • Built an Android controller with a virtual joystick and separate controls for lifting the arm and opening the gripper.
  • Balanced design decisions against available components, manufacturing cost, deadlines, and reliability.
  • Researched indoor localization methods and compared them against precision and implementation constraints.
live 3d panel · pick a mission · drag to orbit · scroll to zoom
03b

Education

  • 2019 to 2021

    Master's in Computer Science, Intelligent Processing Systems (IPS)

    Mohammed V University in Rabat · Rabat, Morocco

  • 2018 to 2019

    Bachelor's in Computer Science, Big Data and Information Systems

    Ecole Supérieure de Technologie de Salé · Salé, Morocco

  • 2016 to 2018

    Associate's Degree in Computer Science, Computer and Software Engineering

    Ecole Supérieure de Technologie de Meknès · Meknès, Morocco

04

Skills

The areas and tools I use to turn data and models into working systems.

machine learning

  • Computer vision
  • Deep learning
  • NLP
  • Generative AI
  • Model training and tuning
  • Model evaluation

software systems

  • Python
  • FastAPI and Flask
  • REST APIs
  • PyTorch
  • Docker
  • Linux deployment
  • SQL and SQLite

data work

  • Web scraping
  • Dataset preparation
  • OCR and document understanding
  • Visual search
  • Annotation workflows
  • Embeddings and vector search

interfaces and hardware

  • PyQt and desktop applications
  • React and web interfaces
  • OpenCV camera systems
  • Arduino and embedded control
  • Bluetooth communication
  • Raspberry Pi and IoT

languages

  • Python
  • JavaScript / TypeScript
  • C++
  • Java
  • SQL
  • R
05

All projects

The wider set of projects and experiments behind the featured work.

showing 14

06

Contact

Open to remote ML and software engineering roles.

availability
open to remote software and machine learning roles
location
marrakech, morocco
languages
Arabic (Expert), English (Fluent), French (Fluent)