Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add FPS display to webcam picker frontend #142

Merged
merged 36 commits into from
Jan 21, 2025
Merged
Show file tree
Hide file tree
Changes from 35 commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
1a7a5ff
Initial commit - add object detection route
bgoelTT Dec 9, 2024
b3fd6df
Add package-lock.json
bgoelTT Dec 9, 2024
a983c61
Add two-column object detection component
bgoelTT Dec 9, 2024
dfd0574
Add new layout and component structure
bgoelTT Dec 10, 2024
4bf1cfa
Use Aceternity UI file picker
bgoelTT Dec 10, 2024
7629cb6
adds tabs to control menu
anirudTT Dec 11, 2024
ebb1431
modifies to move webcam to main component
anirudTT Dec 11, 2024
f23d704
adds webcam component
anirudTT Dec 11, 2024
1058657
add the react package for webcam util
anirudTT Dec 11, 2024
8bba82e
add shadcnn tabs ui component
anirudTT Dec 11, 2024
21b0122
modifies file upload to show last uploaded file + color change + alwa…
anirudTT Dec 11, 2024
57a70f1
Fix containing element scroll and z-stack
bgoelTT Dec 11, 2024
0a9aabc
Merge branch 'object-detection' of github.com:tenstorrent/tt-studio i…
bgoelTT Dec 11, 2024
7cf7cb8
Add overflow scroll to main component
bgoelTT Dec 11, 2024
286015f
Allow images to assume full width of ObjectDetectionComponent
bgoelTT Dec 11, 2024
da1dd2b
Add YoloV4 model config to backend API
bgoelTT Dec 12, 2024
1ea1dd2
Create new object-detection endpoint & expand DeviceConfigurations en…
bgoelTT Dec 16, 2024
10db9f8
Add ModelType enumeration in frontend to faciliate conditional naviga…
bgoelTT Dec 16, 2024
a71e7c6
WIP add components to support:
anirudTT Dec 16, 2024
f7a619b
draw box on image
anirudTT Dec 16, 2024
076bf24
remove
anirudTT Dec 16, 2024
dddfc6c
Merge commit 'a71e7c69161c83a60e5b2cdc77e52422be690cb2' into object-d…
bgoelTT Dec 17, 2024
aadb55f
Merge commit '076bf24462f0166054e870e0f6cfc7f443d87c3b' into object-d…
bgoelTT Dec 17, 2024
ea9e912
Optimize real-time object detection to prevent frame backlog
anirudTT Dec 18, 2024
6a804a6
Ensure webcam stops completely when stop button is clicked +
anirudTT Dec 18, 2024
00edc81
ts fixes
anirudTT Dec 18, 2024
922cfa5
Fix aspect ratio of video container to 4:3
bgoelTT Dec 19, 2024
db3cc36
Fix navigation and add <img> to SourcePicker component - TODO - wire …
bgoelTT Dec 20, 2024
210c063
Refactor inference API call and UI
bgoelTT Dec 20, 2024
54b5259
Fix UI bugs
bgoelTT Dec 20, 2024
cd5c6f7
Merge branch 'staging' of github.com:tenstorrent/tt-studio into objec…
bgoelTT Dec 23, 2024
927aadc
Add API authentication to YOLOv4 backend
bgoelTT Jan 2, 2025
9ed1d10
Address PR comments
bgoelTT Jan 3, 2025
94e0182
Merge branch 'staging' of github.com:tenstorrent/tt-studio into objec…
bgoelTT Jan 19, 2025
363699a
Add FPS measurement and display
bgoelTT Jan 19, 2025
8f1573d
Remove prefix / character in navigation toast
bgoelTT Jan 21, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ export const ObjectDetectionComponent: React.FC = () => {
<div className="text-sm text-gray-500">
Input image width and height: {metadata.width} x {metadata.height}
<br />
Time to inference: {metadata.inferenceTime} sec
Frame Rate: {metadata.inferenceTime} FPS
</div>
)}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,16 @@ export const runInference = async (
}

try {
const startTime = performance.now();
const response = await axios.post(
`/models-api/object-detection/`,
formData,
{
headers: { "Content-Type": "multipart/form-data" },
},
);
const endTime = performance.now();
const requestLatency = endTime - startTime;
// handle imageSourceElement types
let width, height;
if (imageSourceElement instanceof HTMLCanvasElement) {
Expand All @@ -42,7 +45,7 @@ export const runInference = async (
const detectionMetadata: DetectionMetadata = {
width: width,
height: height,
inferenceTime: response.data.inference_time || 33.333,
inferenceTime: response.data.inference_time || (1/(requestLatency/1000)).toFixed(2),
};
const detections: Detection[] = response.data.map(
// eslint-disable-next-line @typescript-eslint/no-explicit-any
Expand Down
Loading