Skip to content

Commit

Permalink
Added detailed instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
pradeepsen99 committed Jun 17, 2021
1 parent 4acb301 commit e3d723d
Show file tree
Hide file tree
Showing 10 changed files with 59 additions and 17 deletions.
8 changes: 4 additions & 4 deletions build/asset-manifest.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"files": {
"main.css": "/pig-annotation-tool/static/css/main.7f904051.chunk.css",
"main.js": "/pig-annotation-tool/static/js/main.49ca8244.chunk.js",
"main.js.map": "/pig-annotation-tool/static/js/main.49ca8244.chunk.js.map",
"main.js": "/pig-annotation-tool/static/js/main.9aa7c58a.chunk.js",
"main.js.map": "/pig-annotation-tool/static/js/main.9aa7c58a.chunk.js.map",
"runtime-main.js": "/pig-annotation-tool/static/js/runtime-main.aae850be.js",
"runtime-main.js.map": "/pig-annotation-tool/static/js/runtime-main.aae850be.js.map",
"static/css/2.cf23c88f.chunk.css": "/pig-annotation-tool/static/css/2.cf23c88f.chunk.css",
"static/js/2.f90c1ada.chunk.js": "/pig-annotation-tool/static/js/2.f90c1ada.chunk.js",
"static/js/2.f90c1ada.chunk.js.map": "/pig-annotation-tool/static/js/2.f90c1ada.chunk.js.map",
"index.html": "/pig-annotation-tool/index.html",
"precache-manifest.2bb66c4da8584f2d59f93fb204be9e67.js": "/pig-annotation-tool/precache-manifest.2bb66c4da8584f2d59f93fb204be9e67.js",
"precache-manifest.78dcaa7621a671b787bb118fcb9e2222.js": "/pig-annotation-tool/precache-manifest.78dcaa7621a671b787bb118fcb9e2222.js",
"service-worker.js": "/pig-annotation-tool/service-worker.js",
"static/css/2.cf23c88f.chunk.css.map": "/pig-annotation-tool/static/css/2.cf23c88f.chunk.css.map",
"static/css/main.7f904051.chunk.css.map": "/pig-annotation-tool/static/css/main.7f904051.chunk.css.map",
Expand All @@ -20,6 +20,6 @@
"static/css/2.cf23c88f.chunk.css",
"static/js/2.f90c1ada.chunk.js",
"static/css/main.7f904051.chunk.css",
"static/js/main.49ca8244.chunk.js"
"static/js/main.9aa7c58a.chunk.js"
]
}
2 changes: 1 addition & 1 deletion build/index.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/pig-annotation-tool/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="AIFARMS annotation tool" content=""/><link rel="apple-touch-icon" href="/pig-annotation-tool/logo192.png"/><link rel="manifest" href="/pig-annotation-tool/manifest.json"/><title>Annotation Tool - ALPHA</title><link href="/pig-annotation-tool/static/css/2.cf23c88f.chunk.css" rel="stylesheet"><link href="/pig-annotation-tool/static/css/main.7f904051.chunk.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><script>!function(t){function e(e){for(var r,a,l=e[0],i=e[1],f=e[2],c=0,s=[];c<l.length;c++)a=l[c],Object.prototype.hasOwnProperty.call(o,a)&&o[a]&&s.push(o[a][0]),o[a]=0;for(r in i)Object.prototype.hasOwnProperty.call(i,r)&&(t[r]=i[r]);for(p&&p(e);s.length;)s.shift()();return u.push.apply(u,f||[]),n()}function n(){for(var t,e=0;e<u.length;e++){for(var n=u[e],r=!0,l=1;l<n.length;l++){var i=n[l];0!==o[i]&&(r=!1)}r&&(u.splice(e--,1),t=a(a.s=n[0]))}return t}var r={},o={1:0},u=[];function a(e){if(r[e])return r[e].exports;var n=r[e]={i:e,l:!1,exports:{}};return t[e].call(n.exports,n,n.exports,a),n.l=!0,n.exports}a.m=t,a.c=r,a.d=function(t,e,n){a.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},a.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},a.t=function(t,e){if(1&e&&(t=a(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(a.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)a.d(n,r,function(e){return t[e]}.bind(null,r));return n},a.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return a.d(e,"a",e),e},a.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},a.p="/pig-annotation-tool/";var l=this.webpackJsonpannotation_tool=this.webpackJsonpannotation_tool||[],i=l.push.bind(l);l.push=e,l=l.slice();for(var f=0;f<l.length;f++)e(l[f]);var p=i;n()}([])</script><script src="/pig-annotation-tool/static/js/2.f90c1ada.chunk.js"></script><script src="/pig-annotation-tool/static/js/main.49ca8244.chunk.js"></script></body></html>
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/pig-annotation-tool/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="AIFARMS annotation tool" content=""/><link rel="apple-touch-icon" href="/pig-annotation-tool/logo192.png"/><link rel="manifest" href="/pig-annotation-tool/manifest.json"/><title>Annotation Tool - ALPHA</title><link href="/pig-annotation-tool/static/css/2.cf23c88f.chunk.css" rel="stylesheet"><link href="/pig-annotation-tool/static/css/main.7f904051.chunk.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><script>!function(t){function e(e){for(var r,a,l=e[0],i=e[1],f=e[2],c=0,s=[];c<l.length;c++)a=l[c],Object.prototype.hasOwnProperty.call(o,a)&&o[a]&&s.push(o[a][0]),o[a]=0;for(r in i)Object.prototype.hasOwnProperty.call(i,r)&&(t[r]=i[r]);for(p&&p(e);s.length;)s.shift()();return u.push.apply(u,f||[]),n()}function n(){for(var t,e=0;e<u.length;e++){for(var n=u[e],r=!0,l=1;l<n.length;l++){var i=n[l];0!==o[i]&&(r=!1)}r&&(u.splice(e--,1),t=a(a.s=n[0]))}return t}var r={},o={1:0},u=[];function a(e){if(r[e])return r[e].exports;var n=r[e]={i:e,l:!1,exports:{}};return t[e].call(n.exports,n,n.exports,a),n.l=!0,n.exports}a.m=t,a.c=r,a.d=function(t,e,n){a.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},a.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},a.t=function(t,e){if(1&e&&(t=a(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(a.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)a.d(n,r,function(e){return t[e]}.bind(null,r));return n},a.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return a.d(e,"a",e),e},a.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},a.p="/pig-annotation-tool/";var l=this.webpackJsonpannotation_tool=this.webpackJsonpannotation_tool||[],i=l.push.bind(l);l.push=e,l=l.slice();for(var f=0;f<l.length;f++)e(l[f]);var p=i;n()}([])</script><script src="/pig-annotation-tool/static/js/2.f90c1ada.chunk.js"></script><script src="/pig-annotation-tool/static/js/main.9aa7c58a.chunk.js"></script></body></html>
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
self.__precacheManifest = (self.__precacheManifest || []).concat([
{
"revision": "f195c3d3716d1d2518f05104b9a002dc",
"revision": "c90ac5ed6ee7cf6f03b4fb9f5683fd0c",
"url": "/pig-annotation-tool/index.html"
},
{
"revision": "35c365517c0ee9b06e72",
"url": "/pig-annotation-tool/static/css/2.cf23c88f.chunk.css"
},
{
"revision": "a491db1c90fc84fd2386",
"revision": "3b56040951b169bf4283",
"url": "/pig-annotation-tool/static/css/main.7f904051.chunk.css"
},
{
Expand All @@ -20,8 +20,8 @@ self.__precacheManifest = (self.__precacheManifest || []).concat([
"url": "/pig-annotation-tool/static/js/2.f90c1ada.chunk.js.LICENSE.txt"
},
{
"revision": "a491db1c90fc84fd2386",
"url": "/pig-annotation-tool/static/js/main.49ca8244.chunk.js"
"revision": "3b56040951b169bf4283",
"url": "/pig-annotation-tool/static/js/main.9aa7c58a.chunk.js"
},
{
"revision": "adfa5934224b12434833",
Expand Down
2 changes: 1 addition & 1 deletion build/service-worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
importScripts("https://storage.googleapis.com/workbox-cdn/releases/4.3.1/workbox-sw.js");

importScripts(
"/pig-annotation-tool/precache-manifest.2bb66c4da8584f2d59f93fb204be9e67.js"
"/pig-annotation-tool/precache-manifest.78dcaa7621a671b787bb118fcb9e2222.js"
);

self.addEventListener('message', (event) => {
Expand Down
2 changes: 0 additions & 2 deletions build/static/js/main.49ca8244.chunk.js

This file was deleted.

1 change: 0 additions & 1 deletion build/static/js/main.49ca8244.chunk.js.map

This file was deleted.

2 changes: 2 additions & 0 deletions build/static/js/main.9aa7c58a.chunk.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions build/static/js/main.9aa7c58a.chunk.js.map

Large diffs are not rendered by default.

45 changes: 43 additions & 2 deletions src/ui_elements/Components/instructions.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,49 @@
import React, { useState } from "react";
import { useState } from 'react';

export default function Instructions(){
return (

<div>
<h3>Keybinds:</h3>

There are preset keybinds setup to make it easier to use the tool without having to click around. If done properly a combination of mouse and keyboard actions speed up the annotation process.
<br></br><br></br>
* <kbd>1</kbd> : Mode Switch: Bounding Box<br></br>
* <kbd>2</kbd> : Mode Switch: Key Point<br></br>
* <kbd>3</kbd> : Mode Switch: Segmentation<br></br>
* <kbd>a</kbd> : Add annotation<br></br>
* <kbd>r</kbd> : Remove selected annotation<br></br>
* <kbd>q</kbd> : Skip backward frame(s)<br></br>
* <kbd>s</kbd> : Save annotation<br></br>
* <kbd>w</kbd> : Pause/Play<br></br>
* <kbd>e</kbd> : Skip forward frame(s)<br></br>

<br></br><br></br>
<h3>Uploading Video:</h3>

Ensure that you know the framerate, vertical and horizontal resolution of the video chosen to be annotated. These values should be entered into the settings tab into their respective fields.
<br></br><br></br>
Click on the right side browse button. All other buttons on the screen shuold be disabled until the video has been uploaded. Currenntly ```.mp4``` format is the best choice and tested for.
<br></br><br></br>
<h3>Annotations</h3>
<br></br>
There are currently three kinds of annotations.
<br></br><br></br>
<h4>Bounding Box:</h4>

This forms a square around the desired object. There should be small squares at the edges of the bounding box which can be used to resize the box. The number on the top left of the box is used to identify the placement of the box in the table to the right.
<br></br><br></br>
<h4>Key Point:</h4>

This generates an object with multiple points and lines attached to each other. They should be arranged around the obejct where the singular circle with one connecting line is the head and progress to each of the other limbs.

***Note: This feature is currently in development and there will be bugs in using this.***
<br></br><br></br>
<h4>Segmentation:</h4>

Upon generating this each click on the video generates a point which eventually will transform to a set of interconnected points. To complete the polygon click on the original point generated (which is the red colored point)

***Note: Unline the Bounding Box, segmentation cant be edited after generated. To fix a mistake remove the annotation and continue from the start.***

</div>
)
}
5 changes: 3 additions & 2 deletions src/ui_elements/Pages/main_upload.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import cellEditFactory, { Type } from 'react-bootstrap-table2-editor';
import 'react-bootstrap-table-next/dist/react-bootstrap-table2.min.css';
import {behaviors} from '../../static_data/behaviors'
import {posture} from '../../static_data/posture'
import Instructions from "../Components/instructions";


const columns = [{
Expand Down Expand Up @@ -472,11 +473,11 @@ function MainUpload() {
<strong className="mr-auto">{toast_text}</strong>
</Toast.Header>
</Toast>
<Modal show={show} onHide={handleClose}>
<Modal show={show} onHide={handleClose} size='lg'>
<Modal.Header closeButton>
<Modal.Title>Instructions</Modal.Title>
</Modal.Header>
<Modal.Body>TODO: Add instructions</Modal.Body>
<Modal.Body><Instructions></Instructions></Modal.Body>
<Modal.Footer>
<Button variant="secondary" onClick={handleClose}>Close</Button>
</Modal.Footer>
Expand Down

0 comments on commit e3d723d

Please sign in to comment.