Cleanup classification

This commit is contained in:
Nicolas Mowen 2025-10-22 06:44:35 -06:00
parent 10e9080093
commit 7e738c6538

View File

@ -632,12 +632,11 @@ function DatasetGrid({
return ( return (
<div <div
ref={contentRef} ref={contentRef}
className="scrollbar-container flex flex-wrap gap-2 overflow-y-auto p-2" className="scrollbar-container grid grid-cols-2 gap-2 overflow-y-scroll p-1 md:grid-cols-4 xl:grid-cols-8 2xl:grid-cols-10 3xl:grid-cols-12"
> >
{classData.map((image) => ( {classData.map((image) => (
<div key={image} className="aspect-square w-full">
<ClassificationCard <ClassificationCard
key={image}
imgClassName="size-auto"
data={{ data={{
filename: image, filename: image,
filepath: `clips/${modelName}/dataset/${categoryName}/${image}`, filepath: `clips/${modelName}/dataset/${categoryName}/${image}`,
@ -662,6 +661,7 @@ function DatasetGrid({
</TooltipContent> </TooltipContent>
</Tooltip> </Tooltip>
</ClassificationCard> </ClassificationCard>
</div>
))} ))}
</div> </div>
); );
@ -791,14 +791,12 @@ function StateTrainGrid({
<div <div
ref={contentRef} ref={contentRef}
className={cn( className={cn(
"scrollbar-container flex flex-wrap gap-3 overflow-y-auto p-2", "scrollbar-container grid grid-cols-2 gap-3 overflow-y-scroll p-1 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-6 xl:grid-cols-8 2xl:grid-cols-10 3xl:grid-cols-12",
isMobile && "justify-center",
)} )}
> >
{trainData?.map((data) => ( {trainData?.map((data) => (
<div key={data.filename} className="aspect-square w-full">
<ClassificationCard <ClassificationCard
key={data.filename}
imgClassName="size-auto"
data={data} data={data}
threshold={threshold} threshold={threshold}
selected={selectedImages.includes(data.filename)} selected={selectedImages.includes(data.filename)}
@ -815,6 +813,7 @@ function StateTrainGrid({
<TbCategoryPlus className="size-7 cursor-pointer p-1 text-gray-200 hover:rounded-full hover:bg-primary-foreground" /> <TbCategoryPlus className="size-7 cursor-pointer p-1 text-gray-200 hover:rounded-full hover:bg-primary-foreground" />
</ClassificationSelectionDialog> </ClassificationSelectionDialog>
</ClassificationCard> </ClassificationCard>
</div>
))} ))}
</div> </div>
); );
@ -934,12 +933,8 @@ function ObjectTrainGrid({
{Object.entries(groups).map(([key, group]) => { {Object.entries(groups).map(([key, group]) => {
const event = events?.find((ev) => ev.id == key); const event = events?.find((ev) => ev.id == key);
return ( return (
<div <div key={key} className="aspect-square w-full">
key={key}
className={cn(isMobile && "aspect-square size-full")}
>
<GroupedClassificationCard <GroupedClassificationCard
key={key}
group={group} group={group}
event={event} event={event}
threshold={threshold} threshold={threshold}