Skip to content

Commit

Permalink
Release v2.7.4
Browse files Browse the repository at this point in the history
  • Loading branch information
nmanovic authored Oct 7, 2023
2 parents 73199d6 + 701c461 commit 2ec5c44
Show file tree
Hide file tree
Showing 39 changed files with 463 additions and 279 deletions.
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ If an item isn't applicable for some reason, then ~~explicitly strikethrough~~ t
line. If you don't do that, GitHub will show incorrect progress for the pull request.
If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
- [ ] I submit my changes into the `develop` branch
- [ ] I have added a description of my changes into the [CHANGELOG](https://github.com/opencv/cvat/blob/develop/CHANGELOG.md) file
- [ ] I have created a changelog fragment <!-- see top comment in CHANGELOG.md -->
- [ ] I have updated the documentation accordingly
- [ ] I have added tests to cover my changes
- [ ] I have linked related issues (see [GitHub docs](
Expand Down
57 changes: 34 additions & 23 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,32 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

<!--
Developers: this project uses scriv (<https://scriv.readthedocs.io/en/stable/index.html>)
to maintain the changelog. To add an entry, create a fragment:
$ scriv create --edit
Fragments will be merged into this file whenever a release is made.
-->

<!-- scriv-insert-here -->

<a id='changelog-2.7.4'></a>
## \[2.7.4\] - 2023-10-06

### Added

- The latest comment displayed in issues sidebar (<https://github.com/opencv/cvat/pull/6937>)

### Fixed

- It was not possible to copy issue comment from issue dialog (<https://github.com/opencv/cvat/pull/6937>)

### Security

- Update Grafana from 9.3.6 to 10.1.2

## \[2.7.3\] - 2023-10-02

### Added
Expand All @@ -18,6 +44,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Fixed

- PCD files with nan values could not be opened on 3D workspace
(<https://github.com/opencv/cvat/pull/6862>)
- Fixed direct navigation to neightbour chunk on 3D workspace
(<https://github.com/opencv/cvat/pull/6862>)
- Intencity level from .bin lidar data ignored when converting .bin -> .pcd
(<https://github.com/opencv/cvat/pull/6862>)
- Incorrectly determined video frame count when the video contains an MP4 edit list
(<https://github.com/opencv/cvat/pull/6929>)
- Internal server error when retrieving data from CS and cache=True
Expand All @@ -42,6 +74,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Downloading additional data from cloud storage if use_cache=true and job_file_mapping are specified
(<https://github.com/opencv/cvat/pull/6879>)
- Leaving an organization (<https://github.com/opencv/cvat/pull/6422>)
- Order of images in annotation file when dumping project in CVAT format (<https://github.com/opencv/cvat/pull/6927>)
- Validation on Cloud Storage form / error message on create task form (<https://github.com/opencv/cvat/pull/6890>)

## \[2.7.1\] - 2023-09-15

Expand Down Expand Up @@ -1738,26 +1772,3 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added

- Initial version

## Template

```
## \[Unreleased]
### Added
- TDB
### Changed
- TDB
### Deprecated
- TDB
### Removed
- TDB
### Fixed
- TDB
### Security
- TDB
```
4 changes: 4 additions & 0 deletions changelog.d/fragment.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
### {{ config.categories | join('|') }} <!-- pick one -->

- Describe your change here...
(<https://github.com/opencv/cvat/pull/XXXX>)
6 changes: 6 additions & 0 deletions changelog.d/scriv.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[scriv]
categories = Added, Changed, Deprecated, Removed, Fixed, Security
entry_title_template = \[{{ version }}\] - {{ date.strftime('%%Y-%%m-%%d') }}
format = md
md_header_level = 2
new_fragment_template = file: fragment.j2
2 changes: 1 addition & 1 deletion cvat-canvas/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cvat-canvas",
"version": "2.17.5",
"version": "2.17.6",
"description": "Part of Computer Vision Annotation Tool which presents its canvas library",
"main": "src/canvas.ts",
"scripts": {
Expand Down
12 changes: 5 additions & 7 deletions cvat-canvas/src/typescript/canvasView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1258,13 +1258,11 @@ export class CanvasViewImpl implements CanvasView, Listener {
window.document.addEventListener('keydown', this.onShiftKeyDown);
window.document.addEventListener('keyup', this.onShiftKeyUp);

this.attachmentBoard.addEventListener('wheel', (event) => {
event.stopPropagation();
});

this.attachmentBoard.addEventListener('mousemove', (event) => {
event.stopPropagation();
});
for (const eventName of ['wheel', 'mousedown', 'dblclick', 'contextmenu']) {
this.attachmentBoard.addEventListener(eventName, (event) => {
event.stopPropagation();
});
}

this.canvas.addEventListener('wheel', (event): void => {
if (event.ctrlKey) return;
Expand Down
6 changes: 3 additions & 3 deletions cvat-canvas3d/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cvat-canvas3d",
"version": "0.0.8",
"version": "0.0.9",
"description": "Part of Computer Vision Annotation Tool which presents its canvas3D library",
"main": "src/canvas3d.ts",
"scripts": {
Expand All @@ -17,8 +17,8 @@
"devDependencies": {},
"dependencies": {
"cvat-core": "link:./../cvat-core",
"@types/three": "^0.125.3",
"@types/three": "^0.156.0",
"camera-controls": "^1.25.3",
"three": "^0.126.1"
"three": "^0.156.1"
}
}
6 changes: 3 additions & 3 deletions cvat-canvas3d/src/typescript/canvas3dModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export interface SplitData {
export interface Image {
renderWidth: number;
renderHeight: number;
imageData: ImageData | CanvasImageSource;
imageData: Blob;
}

export interface DrawData {
Expand Down Expand Up @@ -102,7 +102,7 @@ export enum Mode {
export interface Canvas3dDataModel {
activeElement: ActiveElement;
canvasSize: Size;
image: Image | null;
image: { imageData: Blob } | null;
imageID: number | null;
imageOffset: number;
imageSize: Size;
Expand Down Expand Up @@ -236,7 +236,7 @@ export class Canvas3dModelImpl extends MasterImpl implements Canvas3dModel {
this.data.image = null;
this.notify(UpdateReasons.IMAGE_CHANGED);
})
.then((data: Image): void => {
.then((data: { imageData: Blob }): void => {
this.data.imageSize = {
height: frameData.height as number,
width: frameData.width as number,
Expand Down
112 changes: 93 additions & 19 deletions cvat-canvas3d/src/typescript/canvas3dView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1149,10 +1149,6 @@ export class Canvas3dViewImpl implements Canvas3dView, Listener {
this.statesToBeGrouped = [];
this.clearScene();

const onPCDLoadFailed = (): void => {
model.unlockFrameUpdating();
};

const onPCDLoadSuccess = (points: any): void => {
try {
this.onSceneImageLoaded(points);
Expand All @@ -1164,14 +1160,8 @@ export class Canvas3dViewImpl implements Canvas3dView, Listener {
};

try {
if (!model.data.image) {
throw new Error('No image data found');
}

const loader = new PCDLoader();
const objectURL = URL.createObjectURL(model.data.image.imageData);

try {
if (model.data.image) {
const loader = new PCDLoader();
this.views.perspective.renderer.dispose();
if (this.controller.imageIsDeleted) {
try {
Expand Down Expand Up @@ -1202,14 +1192,97 @@ export class Canvas3dViewImpl implements Canvas3dView, Listener {
model.unlockFrameUpdating();
}
} else {
loader.load(objectURL, onPCDLoadSuccess, () => {}, onPCDLoadFailed);
model.data.image.imageData.arrayBuffer().then((data) => {
const defaultImpl = console.error;
// loader.parse will throw some errors to console when nan values are in PCD file
// there is not way to prevent it, because three.js opinion is that nan values
// in input data is incorrect
let cloud = null;
try {
console.error = () => {};
cloud = loader.parse(data) as THREE.Points;
} finally {
console.error = defaultImpl;
}

let {
position, color, normal, intensity, label,
} = cloud.geometry.attributes;
cloud.material.vertexColors = true;

({
color, position, normal, intensity, label,
} = position.array.reduce((acc, _, i, array) => {
if (
i % 3 === 0 &&
Number.isFinite(array[i]) &&
Number.isFinite(array[i + 1]) &&
Number.isFinite(array[i + 2])
) {
acc.position.push(array[i], array[i + 1], array[i + 2]);

if (
color &&
Number.isFinite(color.array[i]) &&
Number.isFinite(color.array[i + 1]) &&
Number.isFinite(color.array[i + 2])
) {
acc.color.push(color.array[i], color.array[i + 1], color.array[i + 2]);
} else {
acc.color.push(255, 255, 255);
}

if (
normal &&
Number.isFinite(normal.array[i]) &&
Number.isFinite(normal.array[i + 1]) &&
Number.isFinite(normal.array[i + 2])
) {
acc.normal.push(normal.array[i], normal.array[i + 1], normal.array[i + 2]);
}

if (intensity) {
acc.intensity.push(intensity.array[i / 3]);
}

if (label) {
acc.label.push(label.array[i / 3]);
}
}

return acc;
}, {
position: [], color: [], normal: [], intensity: [], label: [],
}));

if (position.length) {
cloud.geometry.setAttribute('position', new THREE.Float32BufferAttribute(position, 3));
}

if (color.length) {
cloud.geometry.setAttribute('color', new THREE.Float32BufferAttribute(color, 3));
}

if (normal.length) {
cloud.geometry.setAttribute('normal', new THREE.Float32BufferAttribute(normal, 3));
}

if (intensity.length) {
cloud.geometry.setAttribute('intensity', new THREE.Float32BufferAttribute(intensity, 1));
}

if (label.length) {
cloud.geometry.setAttribute('label', new THREE.Float32BufferAttribute(label, 1));
}

cloud.geometry.computeBoundingSphere();
onPCDLoadSuccess(cloud);
});
const [overlay] = window.document.getElementsByClassName('cvat_3d_canvas_deleted_overlay');
if (overlay) {
overlay.remove();
}
}
} finally {
URL.revokeObjectURL(objectURL);
}
} catch (error: any) {
model.unlockFrameUpdating();
Expand Down Expand Up @@ -1476,7 +1549,7 @@ export class Canvas3dViewImpl implements Canvas3dView, Listener {
// Setup TopView
const canvasTopView = this.views.top.renderer.domElement;
const topScenePlane = new THREE.Mesh(
new THREE.PlaneBufferGeometry(
new THREE.PlaneGeometry(
canvasTopView.offsetHeight,
canvasTopView.offsetWidth,
canvasTopView.offsetHeight,
Expand All @@ -1499,7 +1572,7 @@ export class Canvas3dViewImpl implements Canvas3dView, Listener {
// Setup Side View
const canvasSideView = this.views.side.renderer.domElement;
const sideScenePlane = new THREE.Mesh(
new THREE.PlaneBufferGeometry(
new THREE.PlaneGeometry(
canvasSideView.offsetHeight,
canvasSideView.offsetWidth,
canvasSideView.offsetHeight,
Expand All @@ -1521,7 +1594,7 @@ export class Canvas3dViewImpl implements Canvas3dView, Listener {
// Setup front View
const canvasFrontView = this.views.front.renderer.domElement;
const frontScenePlane = new THREE.Mesh(
new THREE.PlaneBufferGeometry(
new THREE.PlaneGeometry(
canvasFrontView.offsetHeight,
canvasFrontView.offsetWidth,
canvasFrontView.offsetHeight,
Expand Down Expand Up @@ -1604,7 +1677,8 @@ export class Canvas3dViewImpl implements Canvas3dView, Listener {
private renderRayCaster = (viewType: RenderView): void => {
viewType.rayCaster.renderer.setFromCamera(viewType.rayCaster.mouseVector, viewType.camera);
if (this.mode === Mode.DRAW) {
const [intersection] = viewType.rayCaster.renderer.intersectObjects(this.views.perspective.scene.children);
const [intersection] = viewType.rayCaster.renderer
.intersectObjects(this.views.perspective.scene.children, false);
if (intersection) {
const object = this.views.perspective.scene.getObjectByName('drawTemplate');
const { x, y, z } = intersection.point;
Expand Down
6 changes: 3 additions & 3 deletions cvat-canvas3d/src/typescript/cuboid.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,23 +59,23 @@ export class CuboidModel {
this.front = new THREE.Mesh(geometry, material);

const planeTop = new THREE.Mesh(
new THREE.PlaneBufferGeometry(1, 1, 1, 1),
new THREE.PlaneGeometry(1, 1, 1, 1),
new THREE.MeshBasicMaterial({
color: 0xff0000,
visible: false,
}),
);

const planeSide = new THREE.Mesh(
new THREE.PlaneBufferGeometry(1, 1, 1, 1),
new THREE.PlaneGeometry(1, 1, 1, 1),
new THREE.MeshBasicMaterial({
color: 0xff0000,
visible: false,
}),
);

const planeFront = new THREE.Mesh(
new THREE.PlaneBufferGeometry(1, 1, 1, 1),
new THREE.PlaneGeometry(1, 1, 1, 1),
new THREE.MeshBasicMaterial({
color: 0xff0000,
visible: false,
Expand Down
2 changes: 1 addition & 1 deletion cvat-cli/requirements/base.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
cvat-sdk~=2.7.3
cvat-sdk~=2.7.4
Pillow>=10.0.1
setuptools>=65.5.1 # not directly required, pinned by Snyk to avoid a vulnerability
2 changes: 1 addition & 1 deletion cvat-cli/src/cvat_cli/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
VERSION = "2.7.3"
VERSION = "2.7.4"
2 changes: 1 addition & 1 deletion cvat-sdk/gen/generate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ set -e

GENERATOR_VERSION="v6.0.1"

VERSION="2.7.3"
VERSION="2.7.4"
LIB_NAME="cvat_sdk"
LAYER1_LIB_NAME="${LIB_NAME}/api_client"
DST_DIR="$(cd "$(dirname -- "$0")/.." && pwd)"
Expand Down
2 changes: 1 addition & 1 deletion cvat-ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cvat-ui",
"version": "1.57.0",
"version": "1.57.2",
"description": "CVAT single-page application",
"main": "src/index.tsx",
"scripts": {
Expand Down
Loading

0 comments on commit 2ec5c44

Please sign in to comment.