GSOC community bonding week 3: Change of plans

"Previously on LibreHealth GSOC 2020" [ Recap ]

After forking the repository and writing the Backend, it looked like every thing was going fine the papers were awesome and everything was going well.


"The new Changes"   [ Change of plans ]

The new project in its essence in is very different but technology and implementation wise it is not that big of a change. See I thought we were building a webapp for people to diagnose diseases. Well, that is not at all true. We are building a webapp that annotates diseases with bounding boxes to assist doctors during annotation period. To be a helping hand.

"The new Architecture"   [ Scale ]

The architecture will remain largely the same. But we are taking into account in a real world scenario multiple people will be doing annotations job so, it would be waste if we did inference for each doctor when they for images. We can speed it up. Here is what we will do.

"The frontend"   [ BBoxes ]

The frontend here is actually doing a lot here. It is the drawing bounding boxes on the imgs, these bound boxes can be moved/resized by the annotators. now, I'm sure there must be a library for this but in my case I had to get the co-ordinate of the bboxes to later send to the backend, so I wrote my own custom react component to do this.

How did Do it:
Step 1) made the bbox element draggable.
Step 2) Listen to when the onDragStart and onDragEnd is fired.
Step 3) Get the co-ordinates of the place where dragging ends and update the transition wrt where dragging started
Step 4) You save the co-ordinates of the bbox in your react state.
Step 5) Your bbox moves. Now for resizing, give css prop resize:'both'
Step 6) Now for getting the size listen to mouseup on bbox.
Step 7) onMouseup get offsetWidth and offsetHeight and save it in the react state.

Boom you have a moving and resizable bbox.(Of course the code is in gitlab)

"Next Week"   [ Plan ]

The plan is simple, make an ugly version of the frontend that works completely without breaking.


Comments

Popular posts from this blog

Final Submission

GSOC community bonding week 2: The Paper...s